Fetching a remote file into an MVS data set

This example (SCPGET from SAMPLIB) executes scpg3 and copies a remote file (file.bin) into a data set (//'USER.TEST.BINFILE'). If the data set does not exist, it is created with default values recfm VB and lrecl 1024.

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.