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

How to get current date in a header in the format yyyymmdd ?


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

New User


Joined: 09 Jul 2007
Posts: 59
Location: Chennai

PostPosted: Fri Apr 18, 2008 3:18 pm
Reply with quote

I need to display the current date in the header in the format yyyymmdd.

Ex: 20080418

There should be no separators between year,month & day.

Code:

SORT FIELDS=COPY                   
OUTFIL FILES=OUT,                 
HEADER1=(1:'0001',32:&DATE(4MD' '))


This displays only 2008 04 18.

I tried using
Code:

HEADER1=(1:'0001',32:&DATE(4MD''))


But it gives some syntax error.

Please do let me know how to get this output.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Fri Apr 18, 2008 6:31 pm
Reply with quote

Mariraj,

Try DATENS instead of DATE

Code:
DATENS=(4MD)),
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: Fri Apr 18, 2008 11:27 pm
Reply with quote

Code:

&DATE(4MD' ')


This is invalid syntax - the correct syntax would be as follows (you could use the & but you don't need it):

Code:

DATE=(4MD )


You shouldn't have apostrophes around the blank separator.

If you don't want the separator, use DATENS instead of DATE:

Code:

DATENS=(4MD)
Back to top
View user's profile Send private message
Mariraj

New User


Joined: 09 Jul 2007
Posts: 59
Location: Chennai

PostPosted: Mon Apr 21, 2008 9:29 am
Reply with quote

Thanks to both of you.
DATENS worked fine.
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 To get the the current time DFSORT/ICETOOL 13
No new posts Need to convert date format DFSORT/ICETOOL 20
Search our Forums:

Back to Top