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
 
Format the date

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
bhaskar_kanteti

Active User


Joined: 01 Feb 2007
Posts: 120
Location: USA

PostPosted: Mon Feb 11, 2008 8:26 pm    Post subject: Format the date
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: 2150
Location: At my coffee table

PostPosted: Mon Feb 11, 2008 8:42 pm    Post subject:
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: 120
Location: USA

PostPosted: Mon Feb 11, 2008 9:14 pm    Post subject: Reply to: Format the date
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    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 FTP data transfer from PC to Mainfram... AJAYREDDY All Other Mainframe Topics 5 Wed Aug 23, 2017 9:59 pm
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm


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