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: 13

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: 316
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: 7309
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: 13

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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
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 To get the the current time DFSORT/ICETOOL 13
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Changeman - how can we know the curr... Compuware & Other Tools 2
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
No new posts Fetch data from programs execute (dat... DB2 3
Search our Forums:

Back to Top