We use Control M to schedule jobs on the mainframe environment. the acceptable return codes to Control M are anything less than or equal to 4.
COZ/FTP abends with a return code of 8 and we have the logic below in each SFTP step:
eob
test $? -ne 0 && exit 8
exit 0
However, sometimes instead of return code of 8 we get a return code of 1, which should not be acceptable but is by the Control M jobs setup. What does the code 1 mean? Is there a way I can update the JCL not to accept a code 1 or do I need to update Control M not to accept a code 1 in the SFTP step. I have hundreds of jobs using SFTP.
Coz/ftp and control m
Re: Coz/ftp and control m
If you are running these shell script commands, then you should only get RC = 0 or RC = 8. There might be another issue with your shell script that preventing these statements from running.
Try this example (with your own user, host, etc) to get a Unix shell script trace: (adding ARGS= as shown)
This should get a RC=8
Since your company has an Enterprise support license, please open a ticket: http://dovetail.com/tickets and post your job output and if possible the output from this test.
Also:
Try this example (with your own user, host, etc) to get a Unix shell script trace: (adding ARGS= as shown)
Code: Select all
//SFTP EXEC PROC=SFTPPROC,ARGS='/bin/sh -Lx'
//SFTPIN DD *
pwdsn="MY.PASSWD(A)"
user=myuser
host=myhost
./script_dir/sftp_connect.sh << EOB
get nonexistent_file
EOB
test $? -ne 0 && exit 8
exit 0
//
Since your company has an Enterprise support license, please open a ticket: http://dovetail.com/tickets and post your job output and if possible the output from this test.
Also:
- exitCode = 1 is just the standard OpenSSH SFTP non-success exitCode
- In Release 6.1.0, we introduced more z/OS friendly exit/return codes (0, 8, 12, 16 depending on type of failure). See the release notes: exitCode = 1 is just the standard OpenSSH SFTP non-success exitCode.