Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
Steve Ironmonger

New User

Joined: 19 Oct 2015
Posts: 15
Location: UK

 Posted: Fri May 27, 2016 4:19 pm    Post subject: Convert Decimal to hexadecimal 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    Post subject: Reply to: Convert Decimal to hexadecimal 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: 7312
Location: Inside the Matrix

 Posted: Fri May 27, 2016 4:53 pm    Post subject: Reply to: Convert Decimal to hexadecimal 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    Post subject: Yeah, I thought as much.... And just remind me again how you do that.
Nic Clouston

Global Moderator

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

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

Active User

Joined: 20 Dec 2014
Posts: 447
Location: USA

 Posted: Fri May 27, 2016 8:17 pm    Post subject: Reply to: Convert Decimal to hexadecimal A little more explanation in this post .
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics COnvert a column with mix of hex ,cha... shub2204 DB2 5 Fri Oct 02, 2020 2:20 pm To convert numeric to Packed Decimal vinu78 DFSORT/ICETOOL 9 Fri Jul 31, 2020 7:14 pm how to convert Hex String t char hex Martylin PL/I & Assembler 6 Fri Jun 05, 2020 7:45 pm DFSORT-How to convert ZD to ZS in DFSORT useit DFSORT/ICETOOL 2 Thu Mar 26, 2020 10:43 am Convert a packed decimal value to zon... Dinesh Mani DB2 6 Mon Mar 16, 2020 6:02 pm

 © 2003-2020 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us