I currently need to convert 108 FTP job to SFTP jobs and all of them perform the appending of a file body to a header during the FTP process. So I am trying to find an equivalent since the "Append" command is not supported in SFTP. In my particular case, if I could perform a "cat" command, my problems would be solved.
This is the SFTP Parms (or //COZSFTP.STDIN ) Dataset :
Code: Select all
. $CONFIG
#Get Password from Password File
export PASSWD_DSN='//DWTEST.ABC00011.CONTROL(ABCFTPL1)'
#Setup User@Remote Server Name
cozsftp user001@enterprise.local.server.com <<EOB
#Select Text or Binary
lzopts mode=text
#Move Data from MainFrame to Distributed Server
cd /tmp
pwd
put //ABC0001.MAIN.FRAME.FILE.HEADREC CU13H
put //ABC0001.MAIN.FRAME.FILE.DATAREC CU13D
!cat '/tmp/CU13H' '/tmp/CU13D' > '/tmp/CU13F'
rename 'CU13F' 'CU13_20100927_231103.#finished#'
EOB
So, please tell me, what am I doing wrong ?
Any help will be appreciated, just one thing to please keep in mind, I am a mainframer, so please, do not asume I know everything about Unix.
Thanks