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
 

 

Need to get Yesterday's date in DDMMCCYY format

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

New User


Joined: 02 Oct 2008
Posts: 9
Location: Wellington

PostPosted: Thu Jan 06, 2011 6:51 pm    Post subject: Need to get Yesterday's date in DDMMCCYY format
Reply with quote

This is my ICETOOL input:
Code:

//CPY1CNTL DD *                                                       
  OPTION COPY                                                         
  INREC IFTHEN=(WHEN=(5,7,CH,EQ,X'00000000000000'),                   
           OVERLAY=(1:C'000000000000000',16:689X'00',                 
           705:DATENS=(DM4),713:DATENS=(DM4))),                       
       IFTHEN=(WHEN=(5,7,CH,GT,X'00',AND,5,7,CH,LT,X'FFFFFFFFFFFFFF'),
           OVERLAY=(1:1,11,16:3554,40,56:3602,4,60:3883,19,79:3594,8,
           87:3857,26,113:224X,337:343,3,340:4253,20,360:20X,         
           380:C'0000',12:C'0001',384:20X,404:C'0000000',411:310X))   
/*                                                                   
//CPY2CNTL DD *                                                       
  OUTREC FIELDS=(1,720)                                               
/*                                                                   


I need to get yesterday's date in the second DATENS statement: 713:DATENS=(DM4) and it needs to be in DDMMCCYY format.
Back to top
View user's profile Send private message

Skolusu

Senior Member


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

PostPosted: Fri Jan 07, 2011 12:37 am    Post subject: Reply to: Need to get Yesterday's date in DDMMCCYY format
Reply with quote

Nico van der Merwe,

I am assuming that your CPY1CNTL and CPY2CNTL are used to format the same output file. You really don't need the second pass, as we can do all in 1 pass. Use the following control cards. You don't have to code all 15 zeroes if you want to 15 zeros. You can simply use 15C'0'

Code:

//CPY1CNTL DD *
  INREC IFOUTLEN=720,                                           
  IFTHEN=(WHEN=(5,7,CH,EQ,X'00000000000000'),                   
  OVERLAY=(15C'0',689Z,DATENS=(DM4),8X,DATE1-1,                 
           713:727,2,725,2,721,4)),                             
  IFTHEN=(WHEN=(5,7,CH,GT,X'00',AND,5,7,CH,LT,X'FFFFFFFFFFFFFF'),
  OVERLAY=(12:C'0001',16:3554,40,56:3602,4,60:3883,19,79:3594,8,
           87:3857,26,113:224X,337:343,3,340:4253,20,360:20X,   
           380:4C'0',12:C'0001',384:20X,404:7C'0',411:310X))     
//*
Back to top
View user's profile Send private message
Nico van der Merwe

New User


Joined: 02 Oct 2008
Posts: 9
Location: Wellington

PostPosted: Fri Jan 07, 2011 1:08 pm    Post subject: Reply to: Need to get Yesterday's date in DDMMCCYY format
Reply with quote

Thanks Skolusu
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
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm
No new posts SUBSTR for Date functions Shaheen Shaik DB2 4 Thu Apr 06, 2017 2:14 pm
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts How to pick only YYMMDD from DATE1P (... atulbaviskar SYNCSORT 7 Wed Mar 22, 2017 11:39 am


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