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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to get current date in a header in the format yyyymmdd ?
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: 1288
Location: Chennai, India

PostPosted: Fri Apr 18, 2008 6:31 pm    Post subject: Reply to: How to get current date in a header in the format
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 Moderator


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

PostPosted: Fri Apr 18, 2008 11:27 pm    Post subject:
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    Post subject:
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    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 How to pick only YYMMDD from DATE1P (... atulbaviskar SYNCSORT 7 Wed Mar 22, 2017 11:39 am
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 Convert current to hex value gopurs DFSORT/ICETOOL 4 Wed Feb 15, 2017 5:40 am


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