Posted: Wed May 02, 2012 11:31 am Post subject: How to convert a decimal valuie to hexadecimal using sort
I need help in converting a decimal value to hexadecimal value using sort card.
Below are my requirements,
I have an input file with 834 records,in which each record looks like
and so on...
Now i want to convert the value starting from postion 9 to 12 i:e;the value 2098,3098 to hexadecimal values.How i can acheive this using sort.
Need the resolution ASAP. _________________ Thanks,
Joined: 24 Jul 2011 Posts: 651 Location: Down on the pig farm
Posted: Wed May 02, 2012 2:02 pm Post subject:
Try searching and not posting. If you cannot find by searching - there was an example earlier this week but may not have been this forum - the look in the manual for TOPD (I think). Certainly look in the manual for numeric conversions. _________________ Regards
Joined: 18 Feb 2006 Posts: 812 Location: San Jose, CA
Posted: Wed May 02, 2012 10:21 pm Post subject:
What you actually want is to convert from zoned decimal (ZD) to binary (BI). Assuming you want to overlay the 4-byte ZD value with an equivalent 4-byte BI value, you can use a DFSORT job like the following:
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum