Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Fetching data from JHS as per the cur... arunsoods All Other Mainframe Topics 4 Wed Nov 22, 2017 1:54 pm
No new posts Date in where clause - Windows Karthikeyan Subbarayan DB2 9 Wed Nov 15, 2017 9:07 pm
No new posts Format Last Record differently from r... Learncoholic DFSORT/ICETOOL 5 Tue Oct 24, 2017 12:01 pm
No new posts Format issues using XMITIP MSGDD ssdjp1 CLIST & REXX 5 Mon Oct 23, 2017 8:47 pm
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us