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
 

 

Convert current to hex value

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Convert current to hex value
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: 271
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Wed Feb 15, 2017 12:33 pm    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7279

PostPosted: Wed Feb 15, 2017 2:46 pm    Post subject: Reply to: Convert current to hex value
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    Post subject: Reply to: Convert current to hex value
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10218
Location: italy

PostPosted: Wed Feb 15, 2017 7:50 pm    Post subject: Reply to: Convert current to hex value
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    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 Checking Current date vickey_dw DFSORT/ICETOOL 1 Wed Feb 08, 2017 11:14 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Convert +9999999999999.99 to S9(12)V9(3) vnktrrd DFSORT/ICETOOL 8 Thu Nov 17, 2016 8:15 pm
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts convert PD to ZD ram_vizag DFSORT/ICETOOL 5 Sat Nov 05, 2016 3:06 am


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