Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Convert Decimal to hexadecimal

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Steve Ironmonger

New User


Joined: 19 Oct 2015
Posts: 15
Location: UK

PostPosted: Fri May 27, 2016 4:19 pm    Post subject: Convert Decimal to hexadecimal
Reply with quote

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
Back to top
View user's profile Send private message

Steve Ironmonger

New User


Joined: 19 Oct 2015
Posts: 15
Location: UK

PostPosted: Fri May 27, 2016 4:35 pm    Post subject: Reply to: Convert Decimal to hexadecimal
Reply with quote

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
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Fri May 27, 2016 4:53 pm    Post subject: Reply to: Convert Decimal to hexadecimal
Reply with quote

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,
Back to top
View user's profile Send private message
Steve Ironmonger

New User


Joined: 19 Oct 2015
Posts: 15
Location: UK

PostPosted: Fri May 27, 2016 5:09 pm    Post subject:
Reply with quote

Yeah, I thought as much.... icon_biggrin.gif

And just remind me again how you do that.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1894
Location: UK

PostPosted: Fri May 27, 2016 5:32 pm    Post subject:
Reply with quote

Moved as not a JCL or VSAM question.
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 400
Location: USA

PostPosted: Fri May 27, 2016 8:17 pm    Post subject: Reply to: Convert Decimal to hexadecimal
Reply with quote

A little more explanation in this post

.
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 Extend the decimal values in DIVISION Balaryan DFSORT/ICETOOL 3 Thu Oct 05, 2017 4:05 pm
No new posts Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm
No new posts Convert CLIST to REXX cvnlynn CLIST & REXX 12 Tue Jun 27, 2017 2:06 am
No new posts Convert current to hex value gopurs DFSORT/ICETOOL 4 Wed Feb 15, 2017 5:40 am
No new posts Joinkeys with decimal scdinesh DFSORT/ICETOOL 3 Fri Feb 10, 2017 4:46 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us