IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

"Date" use in ICETOOL - is it possible?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rmd3003

New User


Joined: 03 Jul 2006
Posts: 55

PostPosted: Thu Oct 22, 2009 1:17 am
Reply with quote

I have a slight dilemma. I need to generate control file (one record) with date - 1st of next month.
Basically SORT will run sometime after October 20th of the month but before end of the month and generated file should have following:

Code:
TW2009-11-01


let's say if program is running on November 27th then control file generated by SORT should be

Code:
TW2009-12-01


Thanks.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Oct 22, 2009 1:28 am
Reply with quote

You can use a DFSORT job like the following to do what you asked for:

Code:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
RECORD
/*
//SORTOUT DD DSN=...  output file (FB/12)
//SYSIN    DD    *
  OPTION COPY
  INREC IFTHEN=(WHEN=INIT,BUILD=(DATE2)),
    IFTHEN=(WHEN=(5,2,ZD,EQ,12),
      BUILD=(C'TW',1,4,ZD,ADD,+1,EDIT=(TTTT),C'-01-01')),
    IFTHEN=(WHEN=NONE,
      BUILD=(C'TW',1,4,C'-',5,2,ZD,ADD,+1,EDIT=(TT),C'-01'))
/*
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts PuTTY - "User is not a surrogate... IBM Tools 5
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
Search our Forums:

Back to Top