![]() |
Example 1: JCL with remote command for creating a directory on a remote Unix system:
//SSH EXEC PGM=BPXBATSL,REGION=0M,TIME=NOLIMIT //STDPARM DD * PGM /opt/tectia/bin/sshg3user1@unix.example.commkdirtestdir//STDENV DD DSN=<HLQ>.V650.PARMLIB(SSHENV),DISP=SHR //STDOUT DD SYSOUT=* //STDERR DD SYSOUT=* //STDIN DD DUMMY //
(Use this JCL to complete the following examples.)
Example 2: Remote command for creating a directory on a remote Windows system. Use the following as input data for the STDPARM DD in Example 1:
PGM /opt/tectia/bin/sshg3user2@windows.example.comcmd /c mkdirtestdir
Note that quotes (") are not needed when commands are run from JCL
Example 3: Multiple commands. Use the following as input data for the STDPARM DD in Example 1:
PGM /opt/tectia/bin/sshg3user1@unix.example.comcd /tmp; ls -l test.*; rm test.txt
Note that quotes (") are not needed around multiple remote commands when
they are run from JCL.