× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.