Clip From joblog.
Previous message
CPC2958 Completion 00 10/02/19 05:10:40.995199 QCPEXPRT QSYS *STMT AKLCLP01 BRCPGMS 0028
From module . . . . . . . . : QCPEXPRT
From procedure . . . . . . : Send_type_msg
Statement . . . . . . . . . : 17
Message . . . . : All records copied from file
*NONE Command 10/02/19 05:10:40.999069 QCADRV QSYS 041C AKLCLP01 BRCPGMS 002E
Message . . . . : 7300 - QSH CMD('/QOpenSys/bin/sftp
-b /home/cpasfakl/akl.txt
Current message.
QSH0005 Completion 00 10/02/19 05:10:41.409070 QZSHRUNC QSHELL *STMT AKLCLP01 BRCPGMS 002E
From module . . . . . . . . : QZSHRUNC
From procedure . . . . . . : main
Statement . . . . . . . . . : 149
Message . . . . : Command ended normally with exit status 255.
Paul
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Rob Berendt
Sent: Thursday, October 03, 2019 2:02 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: RCVMSG returning previous message , not current message, which in turn lead to a false positive.
Is the current message a completion message MSGTYPE(*COMP) or something else?
Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1 Group Dekko Dept 1600 Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Steinmetz, Paul via MIDRANGE-L
Sent: Thursday, October 3, 2019 1:41 PM
To: 'Midrange Systems Technical Discussion' <midrange-l@xxxxxxxxxxxxxxxxxx>
Cc: Steinmetz, Paul <PSteinmetz@xxxxxxxxxx>
Subject: RCVMSG returning previous message , not current message, which in turn lead to a false positive.
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
RCVMSG returning previous message , not current message, which in turn lead to a false positive.
I use IBM's sample program - Logging Success or Failure in OpenSSH Batch Mode File Transfers Document Number: 473277768
https://www.ibm.com/support/pages/logging-success-or-failure-openssh-batch-mode-file-transfers
QSH CMD(&CM3)
RCVMSG MSGTYPE(*COMP) RMV(*NO) MSGDTA(&MSGDTA) MSGID(&MSGID)
IF (&MSGID *EQ 'QSH0005') +
CHGVAR &RC %BIN(&MSGDTA)
IF (&RC *EQ 0) THEN(DO)
SNDMSG MSG('The file transfer completed successfully.') TOUSR(user_profile)
ENDDO
IF (&RC *GE 1) THEN(DO)
SNDMSG MSG('The file transfer failed') TOUSR(user_profile)
ENDDO
ENDPGM
On a recent failure , RCVMSG did not return the normal QSH0005.
It returned the previous message in the job, CPC2958, which in turn lead to the false positive.
Anyone in the group run into this issue with RCVMSG?
Thank You
_____
Paul Steinmetz
IBM i Systems Administrator
Pencor Services, Inc.
462 Delaware Ave
Palmerton Pa 18071
610-826-9117 work
610-826-9188 fax
610-349-0913 cell
610-377-6012 home
psteinmetz@xxxxxxxxxx
http://www.pencor.com/
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.