View previous topic :: View next topic
|
Author |
Message |
aravindhsankar
New User
Joined: 28 Aug 2008 Posts: 2 Location: Chennai
|
|
|
|
I have a situation like whenever i run a job, i should generate a dataset which will contain the first of the previous month in the format 'ccyymmdd'.
e.g. If i run the job today(20081022) it should generate the dataset with the value(20080901)
Please help me out. Thanks in advance. |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
The following JCL will create 1 record with previous months first day. The output lrecl is FB and 80 bytes. Change the 80:x to your desired length
Code: |
//STEP0100 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
DUMMY RECORD
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INREC BUILD=(DATE2-1,C'01',80:X)
/* |
|
|
Back to top |
|
|
aravindhsankar
New User
Joined: 28 Aug 2008 Posts: 2 Location: Chennai
|
|
|
|
Thanks Kolusu.
So nice of you. Hats off for your speedy response.!!! |
|
Back to top |
|
|
|