Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can Somebody Provide me the FTPS JCL and PROC

Status
Not open for further replies.

Nits1212

Programmer
Aug 16, 2007
34
IN
Dear All,

Please provide me the information on FTPS solution. I want to transfer the file by using FTPS. Is it also possible to change the file name(or File Move from one folder to another folder) by using FTPS job?
Please suggest,

Regards,
Nits
 
Hi,

I am planning to use FTPS for file transfer from mainframe to SAG EMEA and vice versa. As i came to know is, You shoule always have a fixed input file name. But in my case, input file name contains timestamp on SAG EMEA. so every time when i need to transfer file from SAG EMEA to mainframe, i will have different input file name. can you have any suggestion on, How the file transfer will be possible in this case? before doing file transfer, how can i change the file name? can i execute some job on mainframe which can change the required file name at SAG EMEA and then i can transfer the file? plz suggest.

Awaiting for your input.

Thanks,
Nits
 
use a COBOL program (or other language if you prefer) to create the input file to the FTP step.
This file can contain the originating dataset and the destination dataset which you can define as having a timestamp added to it.


For the job itself, its a standard FTP job, and you should look at other existing jobs on your company to see how they do it.

If there is NONE, then look at the manuals for TCP/IP in the mainframe area of IBM for examples and description of required DD names.

Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Just 6 weeks ago I completed a project for a client that did exactly that: Created a file with the date built into the name and set it up to FTP to a third party. The COBOL program that creates the file also creates an intermediate .BAT file to start the FTP process with the date-stamped file name. If you would like samples of COBOL code, I could send some to you.
 
Dear Webrabbit,

I will appreciate your assistance in this regard, plz do send so that i can refer it and take some input if possible.

Awaiting for your sample program.

Regards,
Nits
 
Ok, here it is
COBOL program
Code:
 Identification Division.
 Program-ID.    FTP-COB.
 Author.        James C. Fairfield
 Date-Written.  03/30/07
     *>
     *> A COBOL program to generate a batch file to initiate
     *> an FTP process with a date-specific file name.
     *>

     Select BATCH-FILE Assign to 'FTP2.BAT'.

 01  BATCH-LINE.
     05             Pic X(13) Value 'CALL FTP.BAT '.
     05  BATCH-DATE Pic 9(08).

 100-BUILD-TEXT-FILE-1.

 200-BUILD-TEXT-FILE-2.

 300-BUILD-BATCH-FILE.
     Move PROCESS-DATE    to BATCH-DATE
     Open Output BATCH-FILE
     Write BATCH-RECORD from BATCH-LINE
     Close BATCH-FILE
     .
FTP1.BAT
Code:
@Echo OFF
Cd ftp-folder
Del *.txt
Del *.zip
Cd ..
Del FTP2.BAT
FTP-COB
If errorlevel 2                   Goto end
If not exist FTP2.BAT             Goto end
If not exist ftp-folder\FILE1.TXT Goto end
If not exist ftp-folder\FILE2.TXT Goto end
Call FTP2.BAT
:end
Rem
FTP.BAT
Code:
Cd ftp-folder
If %1.==.              Goto end
If not exist WORK.FTP  Goto end
If not exist FILE1.TXT Goto end
If not exist FILE2.TXT Goto end
Pkzip %1 FILE1.TXT FILE2.TXT
If not exist %1.ZIP    Goto end
Ftp -s:WORK.FTP
:end
Cd ..
WORK.FTP
Code:
OPEN site-name port-number
user-id
password
CD INBOX
BINARY
PUT *.ZIP
CLOSE
bye
 
Thank you very much Webrabbit, but i am unable to understand file coding, in which language it is? I understood the program.

Please let me know if possible.

Thanks,
Nits
 
The COBOL program is of course in COBOL; the .BAT files are MS/PC DOS Batch files; the .FTP is a series of FTP commands.

If you are working on an IBM mainframe, you can use the Internal Reader of JES to submit a job-stream with generated file names. I havn't worked on a mainframe for over ten years, so I can't provide you with much help there. I noticed another thread asking for mainframe FTP JCL, you might look there.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top