IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Convert Decimal to hexadecimal


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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
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

Moderator Emeritus


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

PostPosted: Fri May 27, 2016 4:53 pm
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
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: 2455
Location: Hampshire, UK

PostPosted: Fri May 27, 2016 5:32 pm
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: 446
Location: USA

PostPosted: Fri May 27, 2016 8:17 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
No new posts Convert single row multi cols to sing... DFSORT/ICETOOL 6
No new posts convert file from VB to FB and use tr... DFSORT/ICETOOL 8
Search our Forums:

Back to Top