MCH3601 is "Pointer not set for location referenced." It is a common
programming mistake. Trying to dereference a pointer that hasn't been
set. (In i, "not set" is different than null.) So probably the problem
is in your code.
QMHSNDM, as most system API's takes pointers for parameters. I'm not
sure if the command interpreter (invoked through "system") is going to
resolve all your constants into pointers. Also, I'd be interested to see
if tht printf was actually producing what you intend.
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of John McKee
Sent: Friday, May 15, 2009 12:37 PM
To: Midrange Systems Technical Discussion
Subject: QSH script throws MCH3601
Is there something wrong with my code, or is this a nasty coincidence?
I ran this QSH script earlier, and it threw MCH3601.
This is a segment of the script:
syscmd="CALL SSYSNDMSG PARM('SPBAHCNCL - Retrieving file:
$i\$')"
system $syscmd
# sysmsg="'SPBAHCNCL - Retrieving file: $i"
# log_sysopr $sysmsg
get_file $i | sftp_session
syscmd="CPYFRMIMPF FROMSTMF('$i') TOFILE(SPBAHCP4) \
RCDDLM(*CRLF) FLDDLM('|')"
export syscmd
echo $syscmd
system $syscmd
done
# sysmsg="CALL SSYSNDMSG PARM('SPBAHCNCL - Ending sFTP file
retrieval\$')"
# system $syscmd
log_sysopr "SPBAHCNCL - Ending sFTP file retrieval"
I know that the command CPYFRMIMPF completed normally. There was only
one file to retrieve. Earlier in the script, there is a reference
log_sysopr and it worked.
As a result of the MCH3601, problem 0913537852 was opened, and three
PTFs were
downloaded: SI23548, SI25812, and SI27729
My feeling is that the las reference to log_sysopr has something wrong
with it, but I don't see the error. The earlier log_qsysopr function
call looks like
this:
log_sysopr "SPBAHCNCL - Starting sFTP file retrieval"
The log_qsysopr function is unchanged, but here it is, anyway:
function log_sysopr() {
doubledquotes="${1//'/''}"
cmd=$(printf "CALL QMHSNDM (CPF9897 'QCPFMSG *LIBL' '%s' \
x'%08x' *INFO *SYSOPR x'00000001' ' ' x'00000000' \
x'00000000')" "$doubledquotes" ${#doubledquotes})
system "$cmd"
}
I have other functions in the dcript, but am not using the function
keyword.
So, I am left with this:
1) function keyword needs to be on all functions or 2) function keyword
needs to be removed or 3) I have something wrong on the second usage of
log_sysopr different than the first that works.
or 4) ?????
I would have loved to have figured this out. But, the PTFs being
downloaded throws me. I did a simple test of the logsysopr earlier,
from an interactive session, just sending a simple message, no
substitution values, and it worked fine.
Is there something obviously wrong here?
John McKee
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.