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

Appending the current date during run time.


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

New User


Joined: 22 May 2007
Posts: 68
Location: mumbai

PostPosted: Sat Apr 05, 2008 11:24 am
Reply with quote

We have one file , in which we have to append the current date during run time.

we can do this using the DATE1 fuction in sort


Code:

  SORT FIELDS=COPY
  OUTREC FIELDS=(DATE1,1,10)


but the date appended is in yyyymmdd format.

Any idea how do can we get it in ddmmccyy format?

regards,
Jaspal
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Apr 05, 2008 4:32 pm
Reply with quote

Hello,

See if this previous topic helps. . .

http://ibmmainframes.com/viewtopic.php?t=7034
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: Sun Apr 06, 2008 5:08 am
Reply with quote

Jaspal,

Assuming that you want the ddmmyyyy date followed by bytes 1-10 of the input record, you would use these DFSORT statements:

Code:

   SORT FIELDS=COPY                     
   OUTREC BUILD=(1:DATENS=(DM4),1,10)   


Note: The syntax you showed was incorrect. I corrected it.
Back to top
View user's profile Send private message
patypaz

New User


Joined: 21 Jun 2007
Posts: 2
Location: Brazil

PostPosted: Tue May 13, 2008 6:57 pm
Reply with quote

Thank you! icon_lol.gif

Great work!!!!
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 Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts To get the the current time DFSORT/ICETOOL 13
No new posts RC query -Time column CA Products 3
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts C Compile time time stamps Java & MQSeries 10
Search our Forums:

Back to Top