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

Convert current to hex value


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

New User


Joined: 04 Apr 2005
Posts: 9

PostPosted: Wed Feb 15, 2017 5:40 am
Reply with quote

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
View user's profile Send private message
mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 310
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Wed Feb 15, 2017 12:33 pm
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7311
Location: Inside the Matrix

PostPosted: Wed Feb 15, 2017 2:46 pm
Reply with quote

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
View user's profile Send private message
gopurs

New User


Joined: 04 Apr 2005
Posts: 9

PostPosted: Wed Feb 15, 2017 7:42 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Senior Moderator


Joined: 14 Mar 2007
Posts: 10712
Location: italy

PostPosted: Wed Feb 15, 2017 7:50 pm
Reply with quote

as usually people care only about the lowly technicalities and do not think at the overall consequences
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 Hex Value - vb file replace old date ... DFSORT/ICETOOL 14
No new posts COnvert a column with mix of hex ,cha... DB2 5
No new posts current batch plan DB2 3
No new posts Trying to add current date in place o... DFSORT/ICETOOL 8
No new posts To convert numeric to Packed Decimal DFSORT/ICETOOL 9
Search our Forums:

Back to Top