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
 

 

Date calculation - is it possible?

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

New User


Joined: 03 Jul 2006
Posts: 53

PostPosted: Wed Oct 28, 2009 1:07 am    Post subject: Date calculation - is it possible?
Reply with quote

I need to create file with one record which will have two dates:
One is current date + 9 days and another date will be current date + 13 days.
Basically if job runs on 10/30, dates in file should be Nov 08 and Nov 12.
Please see below.

Code:
----+----1----+----2--
X2009-11-08X2009-11-12


Thanks
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 28, 2009 1:13 am    Post subject: Reply to: Date calculation - is it possible?
Reply with quote

rmd3003,

use the following DFSORT JCL

Code:

//STEP0100 EXEC PGM=SORT                   
//SYSOUT   DD SYSOUT=*                     
//SORTIN   DD *                             
DUMMY RECORD                               
//SORTOUT  DD SYSOUT=*                     
//SYSIN    DD *                             
  SORT FIELDS=COPY                         
  INREC BUILD=(X,DATE1(-)+9,X,DATE1(-)+13) 
/*


this will create 1 record as follows. The current date today is 10/27/2009

Code:

 2009-11-05 2009-11-09 


if you want alphabet 'x' in between then use this

Code:

//SYSIN    DD *                                 
  SORT FIELDS=COPY                               
  INREC BUILD=(C'X',DATE1(-)+9,C'X',DATE1(-)+13)
/*                                             


this will generate
Code:

X2009-11-05X2009-11-09
Back to top
View user's profile Send private message
rmd3003

New User


Joined: 03 Jul 2006
Posts: 53

PostPosted: Wed Oct 28, 2009 1:31 am    Post subject: Reply to: Date calculation - is it possible?
Reply with quote

Skolusu, thanks a lot.
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 Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts Overlay the system date Danielle.Filteau SYNCSORT 4 Fri Mar 03, 2017 1:16 am
No new posts Checking Current date vickey_dw DFSORT/ICETOOL 1 Wed Feb 08, 2017 11:14 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am


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