In this example (SCPPUT1
from SAMPLIB
),
scpg3 is executed to copy a data set to a remote file
(test.list
), converting the code set from IBM-1047 to
ISO8859-1 and records to CR-LF delimited lines.
The stdout and stderr message files are printed to SYSOUT
. Required
environment variables are supplied in SSHENV
via STDENV DD
.
Modify the DD statement according to your requirements.
//SCPPUT1 EXEC PGM=BPXBATSL,REGION=0M,TIME=NOLIMIT
//STDPARM DD *
PGM /opt/tectia/bin/scpg3
/ftadv:C=ISO8859-1,D=IBM-1047,I=DOS,J=MVS//__HLQ.TEST.LIST
user@remote:test.list
//STDENV DD DSN=<HLQ>
.V650.PARMLIB(SSHENV),DISP=SHR
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//STDIN DD DUMMY
//
The same file transfer can be carried out using sftpg3 in batch
mode (-B
option):
//SFTPPUT1 EXEC PGM=BPXBATSL,REGION=0M,TIME=NOLIMIT
//STDPARM DD *
PGM /opt/tectia/bin/sftpg3 -B //DD:STDIN
user@remote
//STDENV DD DSN=<HLQ>
.V650.PARMLIB(SSHENV),DISP=SHR
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//STDIN DD *
sput /ftadv:C=ISO8859-1,D=IBM-1047,I=DOS,J=MVS//__HLQ.TEST.LIST test.list
//