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 TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts Low values Results from VARCHAR FORMAT balaji81_k DB2 10 Thu Oct 20, 2016 1:18 am
No new posts output data in CSV Format janmejay COBOL Programming 8 Sat Oct 15, 2016 2:20 pm


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