How to use FTP from JCL in Mainframe

Sample JCL to execute FTP in Mainframe. This example use program of ‘FTP’. It puts file from one region to another region.


Sample FTP JCL

//XXXXX EXEC  PGM=FTP,PARM('EXIT')
// *
//STEPLIB    DD DSN=XXX.XXX.XXX.PRODLOAD,
//              DISP=SHR
//CEEDUMP    DD SYSOUT=*
//LEVERIFY   DD SYSOUT=*
//FILEIN     DD DSN=XXXX.XXXX.XXXXX,
//              DISP=SHR
//FILEOUT    DD DSN=&&ABCD2,
//              DISP=(NEW,PASS,DELETE),
//              UNIT=DISK,
//              SPACE=(CYL,(20,10),RLSE),
//              DCB=(RECFM=FB,LRECL=80,BLKSIZE=800
//SYSPRINT   DD SYSOUT=*
//SYSOUT     DD SYSOUT=*
//SYSDUMP    DD SYSOUT=*
//*
 11.11.11.11==> Site addtress
 ABC  ==> ID
 IJKLMNN ==> Pwd
 ascii ==> Type
 PUT 'x.xxxxx.xxxxx.CYYDDD01' ABC_YYYYMMDD.KAI  
      ==> receiving file
 QUIT ==> to come out FTP process
/*

Keep Reading

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.