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" use in ICETOOL - 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: Thu Oct 22, 2009 1:17 am    Post subject: "Date" use in ICETOOL - is it possible?
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 Moderator


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

PostPosted: Thu Oct 22, 2009 1:28 am    Post subject:
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    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 Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm
No new posts RC 20 for Address ISPEXEC "ISRED... pkmurali CLIST & REXX 3 Sun Apr 16, 2017 11:30 pm


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