IMO, the contortions in this thread seem to be in search of the most 
complicated solution.
By just using the z/OS UNIX shell in batch, the OP's requirement can be solved 
in a straightforward way.

FWIW, here's how you would do this with Co:Z SFTP and Co:Z Batch, along with 
our sample proc and scripts:

//SFTP EXEC PROC=SFTPPROC  Co:Z SFTP sample proc
//SFTPIN DD *
# This is a z/OS UNIX shell script
# See: https://dovetail.com/docs/sftp/client.html#client-batch
#
user=EFTMFGET01
host=10.222.xx.xx
port=2222
rfile="EBC-GOV-$(sysvar LYYMMDD).txt"
                                           
. $script_dir/sftp_connect.sh <<EOB
lzopts mode=text
cd /FRB/EBCClearing/Staging/tmp
get $rfile  //DD:MYDD
EOB 

//MYDD  DD DSN=NBFDP.DATA.XX.XX.SFTP,DISP=...
//*  

The IBM /bin/sysvar shell command makes it trivial to get system symbols.
Co:Z Batch also includes support for using exported JES symbols in your shell 
scripts.
Although more cumbersome, it is possible to use BPXBATCH,  IBM sftp, and cp or 
OCOPY to do this.

Kirk Wolf
Dovetailed Technologies
http://dovetail.com

Co:Z is free to use under the terms of our Community License
http://dovetail.com/support.html



----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to