Author Message
Steve Ironmonger

New User

Joined: 19 Oct 2015
Posts: 15
Location: UK

 Posted: Fri May 27, 2016 4:19 pm I've got a 14 digit number and I want to convert it to hex :- 10101300193100 and I want to convert it so the hex value looks like this then when I turn hex on file edit :- 1110130 0030910 It's an account number so it's always a positive number My dfsort knowledge is a bit rusty and the old brain matter isn't working quite as well as it once did, I'm sure 12 months ago I could of done this in my sleep ! help would be greatly appreciated ! cheers Steve
Steve Ironmonger

New User

Joined: 19 Oct 2015
Posts: 15
Location: UK

 Posted: Fri May 27, 2016 4:35 pm I've tried OUTREC BUILD=(1,14,ZD,TO=PD) but I get the following when I look turn hex on when I look at my output ! 00030910 1110130C
Bill Woodger

Moderator Emeritus

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

 Posted: Fri May 27, 2016 4:53 pm Well, it's a Binary Coded Decimal that you want. "Converting it to hex" is not a clear description. You are going to have to multiply your ZD by 10, giving you the PD (one byte longer than needed for your final result) then ignore the right-most byte,
Steve Ironmonger

New User

Joined: 19 Oct 2015
Posts: 15
Location: UK

 Posted: Fri May 27, 2016 5:09 pm Yeah, I thought as much.... And just remind me again how you do that.
Nic Clouston

Global Moderator

Joined: 10 May 2007
Posts: 2448
Location: Hampshire, UK

 Posted: Fri May 27, 2016 5:32 pm Moved as not a JCL or VSAM question.
RahulG31

Active User

Joined: 20 Dec 2014
Posts: 446
Location: USA

 Posted: Fri May 27, 2016 8:17 pm A little more explanation in this post .
 View Bookmarks All times are GMT + 6 Hours

 Topic Forum Replies Similar Topics HOW TO OVERLAY A Packed decimal VALUE... DFSORT/ICETOOL 5 Write Character to Hexadecimal file w... COBOL Programming 8 Hexadecimal Group compare and write t... DFSORT/ICETOOL 5 COnvert a column with mix of hex ,cha... DB2 5 To convert numeric to Packed Decimal DFSORT/ICETOOL 9
Search our Forums: