× 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.



Interesting. I don't get an errors when I run this script... tried it many times. I'm stumped.

Are you sure you get this when you haven't run the rest of the script? Have you signed off & back on again to make sure the old script is gone from memory?


John McKee wrote:
In this case, since the processing within the loop completed, I could track it
somewhat.

To investigate it deeper, I copied the script and gutted everything but the
first and last function call. When the second function call is hit, I get the
MCH. Doesn't matter if the first call is run or not.

Here is the stripped down code:

#!/bin/sh

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"
}

log_sysopr "SPBAHCNCL - Starting sFTP file retrieval"

log_sysopr "SPBAHCNCL - Ending sFTP file retrieval"


If the second message was longer, I could maybe understand why it is a problem.

John McKee

Quoting rob@xxxxxxxxx:

How do you tell WHERE it threw the MCH3601? By the echo's?

Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





From:
John McKee <jmmckee@xxxxxxxxxxxxxx>
To:
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Date:
05/15/2009 02:10 PM
Subject:
QSH script throws MCH3601
Sent by:
midrange-l-bounces@xxxxxxxxxxxx



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.



--
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.

This thread ...

Follow-Ups:
Replies:

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.