Mainframe EDC Messages.

Discussion of the COZBATCH utility for z/OS
Post Reply
cvs
Posts: 7
Joined: Mon Jan 16, 2012 3:17 pm

Mainframe EDC Messages.

Post by cvs »

I'm new to Co:Z SFTP and work on a mainframe to send/retrieve files and I would like to have messages displayed for Server Name, Directory Path, File Name, etc.. Similar to what we currently receive for FTP Messages. We have a number of programs that are coded to look for specific message codes and parse accordingly. I don't know if there is a way to turn the feature on. I've noticed several others post referencing EDC messages (or whatever message prefix is available), which we can modify our code to the new messages. Is there a way to turn this feature on from within a specific job or is this a system configurable feature. If it can be turned on within a job, can you provide me with the command(s) I need to use within my parameter file. A sample of a parameter is below:

remoteuser="<userid>f"
remotefile="filename.txt"
remotedir="/shared/etl_apps/TPMS/FM_HOME/outbound/str_prov_nbr"
localfile="//DD:UPLOAD"
server="<servername>"
servercp="ISO8859-1"
export PASSWD_DSN='SYS3.OMVS.SFTP.PARMS('$remoteuser')'
export SSH_ASKPASS=read_passwd_dsn.sh
export DISPLAY=none
ssh_opts="-oBatchMode=no" # allows ssh to use SSH_ASKPASS program
ssh_opts="$ssh_opts -oConnectTimeout=60"
ssh_opts="$ssh_opts -oServerAliveInterval=60"
ssh_opts="$ssh_opts -oStrictHostKeyChecking=no" # accept initial host
cozsftp $ssh_opts -b- $remoteuser@$server <<EOB
lzopts mode=text,NOtrim,servercp=$servercp
cd $remotedir
dir
ls -l
get $remotefile $localfile
EOB
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: Mainframe EDC Messages.

Post by dovetail »

With the job given, you will get messages in DD:STDERR (or DD:SYSOUT if you don't have STDERR) that include:

ZosDataset: Opening dataset DD:UPLOAD for write
ZosDataset: Closing dataset //HLQ.MY.DATASET - 675 bytes received, 22 records written


Is this what you are asking or do you want messages to go somewhere else?
cvs
Posts: 7
Joined: Mon Jan 16, 2012 3:17 pm

Re: Mainframe EDC Messages.

Post by cvs »

In sysout using cozftp I receive the following output (truncated):

cozsftp> lzopts mode=text,NOtrim,showall,servercp=ISO8859-1
mode=text servercp=ISO8859-1 showall
NOtrim
cozsftp> # 10.18.48.216
cozsftp> CD /cygdrive/e/TPMS/TPMS_Testing/DEV/Remittance/Common/835/10001_RP
cozsftp> ls -l
-rwx------ 1 ???????? ???????? 400515 Oct 7 09:22 10_04_2013.aet.era
-rwx------ 1 ???????? ???????? 1686 Oct 7 09:23 10_04_20131.aet.era
-rwx------ 1 ???????? ???????? 344733 Oct 7 09:22 10_05_2013.aet.era
-rwx------ 1 ???????? ???????? 1110 Oct 7 09:23 10_05_20131.aet.era
cozsftp> CD /
cozsftp> CD /cygdrive/e/TPMS/TPMS_Testing/DEV/Remittance/Common/835/10002_RP
cozsftp> ls -l
cozsftp> CD /
cozsftp> CD /cygdrive/e/TPMS/TPMS_Testing/DEV/Remittance/Common/835/10007_RP
cozsftp> ls -l
cozsftp> CD /

When using an FTP I receive (sample)

EZA1736I FTP <machine name> (exit
EZY2640I Using dd:SYSFTPD=TCPIP.PARMLIB(FTPDATA) for local site configur
EZA1450I IBM FTP CS V1R13
EZA1466I FTP: using TCPIP
EZA1772I FTP: EXIT has been set.
EZA1554I Connecting to: <machine name> <id address>.
220-Microsoft FTP Service
220 <machine name> aka <machine name>
EZA1701I >>> USER <user id>
331 Password required for <user id>.
EZA1701I >>> PASS
230-Welcome to <company> FTP!!!
230 User cvs\teamftp logged in.
EZA1460I Command:
EZA1736I CD Mis/ProdTPMS/Remittance/Common/835/10001_RP
EZA1701I >>> CWD Mis/ProdTPMS/Remittance/Common/835/10001_RP
250 CWD command successful.
EZA1460I Command:
250 CWD command successful.
EZA1460I Command:
EZA1736I DIR
EZA1701I >>> PORT 10,7,1,61,252,215
200 PORT command successful.
EZA1701I >>> LIST
150 Opening ASCII mode data connection for /bin/ls.
EZA2284I -rwxrwxrwx 1 owner group 351087 Oct 10 9:05 10_09_2013.aet.era

I'm looking for a way to get some sort of message id (whatever cozftp can generate) associated with actions like EZA1736I OR EZA2284I where I can parse out the location and files within a path.
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: Mainframe EDC Messages.

Post by dovetail »

There are not currently any messages generated by the Co:Z SFTP client other than the ones that you see.

In the future, we plan to implement exits in the client which would allow you to generate messages to trigger automation.
Post Reply