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

Format the date


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

Active User


Joined: 01 Feb 2007
Posts: 123
Location: Hyderabad

PostPosted: Mon Feb 11, 2008 8:26 pm
Reply with quote

Hi,
I am creating my header and trailer as below
INPUT AND OUTPUT is of FB format and of RECL 80

Code:

HEADER1=(1:C'0000000000',               
         DATENS=(4MD),21:C'RBS'),       
TRAILER1=(1:C'9999999999',DATENS=(DM4),
         COUNT=(M11,LENGTH=08)),       
OUTREC=(1:1,29,30:51X)                 


While creating header record the date is populated as format YYYYMMDD. But i want to populate as YYYY-MM-DD. How can i get this.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Mon Feb 11, 2008 8:42 pm
Reply with quote

Have you looked into DATE instead of DATENS?
Quote:
DATE=(abcd)
specifies that the current date is to appear in the report record in the form ’adbdc’, where a, b, and c indicate the order in which the month, day, and year are to appear and whether the year is to appear as two or four digits, and d is the character to be used to separate the month, day and year.

For a, b, and c, use M to represent the month (01-12), D to represent the day (01-31), Y to represent the last two digits of the year (for example, 05), or 4 to represent the four digits of the year (for example, 2005). M, D, and Y or 4 can each be specified only once. Examples: DATE=(DMY.) would produce a date of the form ’dd.mm.yy’, which on March 29, 2005, would appear as ’29.03.05’. DATE=(4MD−) would produce a date of the form ’yyyy-mm-dd’, which on March 29, 2005, would appear as ’2005-03-29’.

a, b, c, and d must be specified.
Back to top
View user's profile Send private message
bhaskar_kanteti

Active User


Joined: 01 Feb 2007
Posts: 123
Location: Hyderabad

PostPosted: Mon Feb 11, 2008 9:14 pm
Reply with quote

Thank you so much.
It worked.
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 Populate last day of the Month in MMD... SYNCSORT 2
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 Need help to append a date&tsp at... DFSORT/ICETOOL 9
Search our Forums:

Back to Top