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 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: 10
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: 10
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: 7223

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: 10
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: 1712
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: 331
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 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
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am


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