Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Fetching data from JHS as per the cur... arunsoods All Other Mainframe Topics 4 Wed Nov 22, 2017 1:54 pm
No new posts Date in where clause - Windows Karthikeyan Subbarayan DB2 9 Wed Nov 15, 2017 9:07 pm
No new posts Comparision with current time arunsoods DFSORT/ICETOOL 5 Thu Nov 09, 2017 10:37 am
This topic is locked: you cannot edit posts or make replies. Comparing current time with the time ... arunsoods SYNCSORT 1 Mon Oct 30, 2017 4:07 pm
This topic is locked: you cannot edit posts or make replies. Incrementing current time field by 30... arunsoods DFSORT/ICETOOL 11 Thu Oct 26, 2017 3:22 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us