Your browser does not allow storing cookies. We recommend enabling them.

SSH

File Transfers Using REXX Scripts and a JCL Procedure

Tectia Server for IBM z/OS contains example file transfer procedure and REXX functions for scpg3, sftpg3, and sshg3 client applications.

The following PROC, REXX functions, and examples can be found from SAMPLIB and they can be easily modified according to the customer environment and needs. The REXX functions can also be called from user-written REXX programs.

  • SSZJSAMP: Comprehensive JCL example file containing file transfer and remote command examples

  • SSZJSFTP: Example JCL file for running multiple sftpg3 commands

  • SSZP: JCL Procedure for running REXX functions

Enabling the File Transfer JCL Procedure

By default, the JCL prodecure is set to run from the default SAMPLIB location, //'&SYSUID..SSZ.SRVR63.SAMPLIB'. If the procedure and REXX functions are run from some other location, modify the EXECLIB parameter on the SSZP procedure accordingly.

Example 1: SSZJSFTP

In this example multiple sftpg3 file transfer commands are run using the SSZP procedure:

//SFTP  EXEC SSZP,
//       PARM='SSZRFT'
//*
//SFTCMDS DD *
open username@unix_server.example.com
sget text_file.txt //'USERID.TEST.DATA.SET'
sput //'USERID.TEST.DATA.SET' demo_file.txt 
lrm //TEST.DATA.SET 
sget demo_file.txt //PDS(MEM2) 
rm demo_file.txt 
sput //'USERID.PDS(MEM2)' member2 
ascii
lsite O=FB R=80
sget jcl.txt //'USERID.JCLLIB(JCL1)'


 

 
PrivX
 

 

 
What to read next:

  • Reduce Secure Shell risk. Get to know the NIST 7966.



    The NISTIR 7966 guideline from the Computer Security Division of NIST is a direct call to action for organizations regardless of industry and is a mandate for the US Federal government.
    Download now
  • ISACA Practitioner Guide for SSH



    With contributions from practitioners, specialists and SSH.COM experts, the ISACA “SSH: Practitioner Considerations” guide is vital best practice from the compliance and audit community.
    Download now