How to ftp the file by appending the number at the end of the file using JCL

Viewed 132

We have Job which will run 4 times in a day, so now at every time it runs it creates a file and ftp the file as "LCD_BI_ORDERINFO_&OYMD._&OHHMM._001_01.txt " , So now i want the file to be sent as below:

after each run it should append with 01 02 03 and 04.txt at the end of the file as below.

LCD_BI_ORDERINFO_&OYMD._001_01.txt
LCD_BI_ORDERINFO_&OYMD._001_02.txt
LCD_BI_ORDERINFO_&OYMD._001_03.txt
LCD_BI_ORDERINFO_&OYMD._001_04.txt 

Thanks in advance

1 Answers

Wrap your existing job as a cataloged procedure with a parameter indicating the suffix number. Now, instead of one job that runs four times a day, have four different sets of execution JCL for the cataloged proc, each of which will execute once a day, specifying the correct suffix number.

Schedule these in your shop's job scheduler.

Related