Alternately, an exec that runs FTP itself then scrapes the SYSPRINT would
help.
tia
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX
//OUT01 DD DSN=&DSNAME.,
// DCB=(LRECL=&LENGTH.,BLKSIZE=0,RECFM=FB),
// DISP=(,CATLG),UNIT=(SYSDA,8),SPACE=(TRK,(1,1),RLSE)
//*
//S002 EXEC PGM=FTP,REGION=2048K
//*SYSPRINT DD SYSOUT=*
//*OUTPUT DD SYSOUT=*
//SYSPRINT DD *
//*OUTPUT DD DISP=(NEW,PASS),DCB=(LRECL=133,BLKSIZE=0,RECFM=FBA)
//OUTPUT DD DISP=(NEW,PASS)
//INPUT DD *
22.139.255.77
pager
pager
bin
put '&DSNAME.' &DSNAME.
quit
/*
//S003 EXEC PGM=PIPE,
// PARM='QSAM PIPE|CHOP STR /--/|JOIN *|RUNPIPE|PAD 80|QSAM PIPEMSG'
//PIPEMSG DD *
//TEMP01 DD DISP=(NEW,PASS),DCB=(LRECL=80,BLKSIZE=0,RECFM=FB)
//FTPOUT DD DSNAME=*.S002.OUTPUT,DISP=(OLD,PASS)
//SYSTSPRT DD *
//PIPE DD *
(END \)
|< DD=FTPOUT -- Read FTP Output
--|cons -- Remove -- at begining to see FTP Output
|STRFIND /EZA1617I/ -- Look for "TRANSFERRED" message
|COUNT LINES -- Count = 0 if not found
|S:STRFIND /0/ -- If not found then tell someone
|SPEC /XMIT PCCVSNHA.U051819 DD(FTPERR) NONOT/ N
|F:FANINANY -- Funnel in streams
|> DD=TEMP01 coerce -- Output TSO command(s) to temp dataset
\S: -- Transfer OK so delete dataset
|SPEC /DELETE '&DSNAME'/ N
|F:
/*
//*
//S004 EXEC PGM=IKJEFT01
//FTPERR DD DSNAME=*.S002.OUTPUT,DISP=(OLD,PASS)
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DSNAME=*.S003.TEMP01,DISP=(OLD,PASS)
//SYSTSIN DD *
/*
I have found the SYSPRINT DD statement in the original TCP/IP utility
implementations difficult to work with. I have found the OUTPUT DD in FTP and the
"o" versions of the TCP/IP utilities (like orexec instead of rexec) easier to
wrap REXX around (using BPXBATCH).
If my FTPPUT is run with several FTP* DD's it will attempt to send all files
even if one of the first files gets and error (returned RC=4 and a detailed
report of each file's RC). When knowledge of each individual file's RC is
needed in the JCL, I recommend sending one file per FTPPUT step.
Let me know if this will help,
Rob
The intention is to generate warnings/alerts (non-zero step return code)
that the batch FTP transmission was incomplete regardless of the direction
of data flow.
//USER28F JOB ,CARTER,MSGLEVEL=(1,1)
//FTPSTP1 EXEC PGM=FTP,REGION=2048K,
// PARM='9.67.112.25 (EXIT TIMEOUT 20'
//NETRC DD DSN=ANYHLQ.NETRC,DISP=SHR
//SYSPRINT DD SYSOUT=H
//OUTPUT DD SYSOUT=H
//INPUT DD *
type e
mode b
put idss.parts
/*
The (EXIT causes dependable return codes that can be tested in JCL. The
other thing that my FTPPUT did was support GDG's. Looking at the z/OS 1.3 manual,
it appears IBM fixed that little annoyance.
The IP User's Guide is pretty good for FTP. Here is the link to the FTP
Batch section.
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/F1AA2032/1.4.8?DT=2
0001127174124
The return codes are usually 5 digits long. The first 2 digits tell you
which command failed and the last 3 indicate the problem. This is also documented
in the IP User's Guide.
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/F1AA2032/1.4.10?DT=
20001127174124
Hope This Helps,
When your only tool is a hammer, every problem looks like a nail. ... a
review of the toolkit is in order.
-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU]On Behalf
Of Robert Zenuk
Sent: Tuesday, January 06, 2004 12:58 PM
To: TSO-...@VM.MARIST.EDU
Subject: Re: FTP error checking
- seb
>The return codes are usually 5 digits long. The first 2 digits tell you
>which command failed and the last 3 indicate the problem. This is also documented
>in the IP User's Guide.
After you have parsed the return code (ssrrr) into ss and rrr:
subcmd. = "Invalid"
subcmd.1 = "AMBIGUOUS"
subcmd.2 = "?"
subcmd.3 = "ACCOUNT"
subcmd.4 = "APPEND"
subcmd.5 = "ASCII"
subcmd.6 = "BINARY"
subcmd.7 = "CD"
subcmd.8 = "CLOSE"
subcmd.9 = "TSO"
subcmd.10 = "OPEN"
subcmd.11 = "DEBUG"
subcmd.12 = "DELIMIT"
subcmd.13 = "DELETE"
subcmd.14 = "DIR"
subcmd.15 = "EBCDIC"
subcmd.16 = "GET"
subcmd.17 = "HELP"
subcmd.18 = "LOCSTAT"
subcmd.19 = "USER"
subcmd.20 = "LS"
subcmd.21 = "MDELETE"
subcmd.22 = "MGET"
subcmd.23 = "MODE"
subcmd.24 = "MPUT"
subcmd.25 = "NOOP"
subcmd.26 = "PASS"
subcmd.27 = "PUT"
subcmd.28 = "PWD"
subcmd.29 = "QUIT"
subcmd.30 = "QUOTE"
subcmd.31 = "RENAME"
subcmd.32 = "SENDPORT"
subcmd.33 = "SENDSITE"
subcmd.34 = "SITE"
subcmd.35 = "STATUS"
subcmd.36 = "STRUCT"
subcmd.37 = "SUNIQUE"
subcmd.38 = "SYSTEM"
subcmd.39 = "TRACE"
subcmd.40 = "TYPE"
subcmd.41 = "LCD"
subcmd.42 = "LOCSITE"
subcmd.43 = "LPWD"
subcmd.44 = "MKDIR"
subcmd.45 = "LMKDIR"
subcmd.46 = "EUCKANJI"
subcmd.47 = "IBMKANJI"
subcmd.48 = "JIS78KJ"
subcmd.49 = "JIS83KJ"
subcmd.50 = "SJISKANJI"
subcmd.51 = "CDUP"
subcmd.52 = "RMDIR"
subcmd.53 = "HANGEUL"
subcmd.54 = "KSC5601"
subcmd.55 = "TCHINESE"
subcmd.56 = "RESTART"
subcmd.99 = "UNKNOWN"
reason. = "??" /* default
*/
reason.000 = "FTP subcommand contains an incorrect parameter"
reason.110 = "Restart marker reply"
reason.120 = "Service ready in nnn minutes"
reason.125 = "Data connection already open; transfer starting"
reason.150 = "File status okay; about to open data connection"
reason.200 = "Command okay"
reason.202 = "Command not implemented; not used on this host"
reason.208 = "Unable to delete data set because expiration date",
"has not passed"
reason.211 = "System status, or system help reply"
reason.212 = "Directory status"
reason.213 = "File status "
reason.214 = "Help message"
reason.215 = "MVS is the operating system of this server"
reason.220 = "Service ready for new user"
reason.221 = "QUIT command received"
reason.226 = "Closing data connection; requested file action",
"successful "
reason.230 = "User logged on; proceed"
reason.250 = "Requested file action okay, completed"
reason.257 = "PATH NAME created"
reason.331 = "Send password please"
reason.332 = "Supply minidisk password using account"
reason.421 = "Service not available"
reason.425 = "Cannot open data connection"
reason.426 = "Connection closed; transfer ended abnormally"
reason.450 = "Requested file action not taken; file busy"
reason.451 = "Requested action abended; local error in processing"
reason.452 = "Requested action not taken; insufficient storage",
"space in system"
reason.500 = "Syntax error; command unrecognized"
reason.501 = "Syntax error in parameters or arguments"
reason.502 = "Command not implemented"
reason.503 = "Bad sequence of commands"
reason.504 = "Command not implemented for that parameter"
reason.530 = "Not logged on"
reason.532 = "Need account for storing files"
reason.550 = "Requested action not taken; file not found or no",
"access "
reason.551 = "Requested action abended; page type unknown"
reason.552 = "Requested file action ended abnormally; exceeded",
"storage allocation"
reason.553 = "Requested action not taken; file name not allowed"
reason.554 = "Transfer aborted; unsupported SQL statement"
say subcmd.ss""reason.rrr
(change Arabic number to Roman numeral to email)