View previous topic :: View next topic
|
Author |
Message |
gopurs
New User
Joined: 04 Apr 2005 Posts: 13
|
|
|
|
I want to convert the below input file record at position 68 (date field) with current date in the same format
Input
-------
Position 68
ø
00711
2103C
Output (for todays date -02/14/2017)
ø
00724
2101C
I am not sure what to do with my overlay. I want current date in position 68. The output should be like the above if I run it today.
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=(43,02,CH,EQ,C'05',AND,45,04,BI,EQ,X'000C'),
OVERLAY=(68:DATE1 ???))
END |
|
Back to top |
|
|
mistah kurtz
Active User
Joined: 28 Jan 2012 Posts: 316 Location: Room: TREE(3). Hilbert's Hotel
|
|
|
|
Try this
Code: |
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=(43,02,CH,EQ,C'05',AND,45,04,BI,EQ,X'000C'),
OVERLAY=(68:DATE1P))
END |
|
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
And bear in mind that at one second past midnight, somewhere in the world, that may not be the date you want.
And it won't work particularly well for testing, nor for re-runs. |
|
Back to top |
|
|
gopurs
New User
Joined: 04 Apr 2005 Posts: 13
|
|
|
|
I tired almost the same way as Mr. Mistah mentioned and it worked.
overlay=68:X,date1p
Not sure whether I need the X if Date1p already converts the current date to hex.
Thank you for your response. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
as usually people care only about the lowly technicalities and do not think at the overall consequences |
|
Back to top |
|
|
|