Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

To get previous month first day whener i run the job

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
aravindhsankar

New User


Joined: 28 Aug 2008
Posts: 2
Location: Chennai

PostPosted: Wed Oct 22, 2008 2:46 pm    Post subject: To get previous month first day whener i run the job
Reply with quote

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
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Oct 22, 2008 8:51 pm    Post subject: Reply to: To get previous month first day whener i run the j
Reply with quote

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
View user's profile Send private message
aravindhsankar

New User


Joined: 28 Aug 2008
Posts: 2
Location: Chennai

PostPosted: Thu Oct 23, 2008 10:23 pm    Post subject:
Reply with quote

Thanks Kolusu.
So nice of you. Hats off for your speedy response.!!!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts How to get previous month in SYMNAMES Suganya87 SYNCSORT 9 Fri Oct 28, 2016 1:37 pm
No new posts sort with previous record anatol DFSORT/ICETOOL 9 Thu Oct 06, 2016 2:36 am
No new posts Retrieve current year or month using ... vnktrrd DFSORT/ICETOOL 15 Tue Mar 15, 2016 4:14 pm
No new posts Find list of all TSO users who used i... newroad CA Products 2 Fri Nov 06, 2015 12:01 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us