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
 
To convert Decimal to hexadecimal

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
narasimha.g

New User


Joined: 10 Sep 2009
Posts: 68
Location: Liverpool

PostPosted: Mon Oct 05, 2009 4:46 pm    Post subject: To convert Decimal to hexadecimal
Reply with quote

Hi...

I have a dataset which contains fields in decimal format.
Eg. 123456789

I am writing a jcl to convert this is hex format. X'123456789C'

Im using the following code with SYNCSORT utility.
OUTREC FIELDS=1:1,9,ZD,PD,LENGTH=5

but im getting values as
00041
0013F
where as i want iot yo be

00041
0013C

Can u pls help me in solving this
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Oct 05, 2009 5:07 pm    Post subject:
Reply with quote

Aren't C & F both positive ?

If so, what is the problem ?
Back to top
View user's profile Send private message
narasimha.g

New User


Joined: 10 Sep 2009
Posts: 68
Location: Liverpool

PostPosted: Mon Oct 05, 2009 5:11 pm    Post subject: Reply to: To convert Decimal to hexadecimal
Reply with quote

ya they both are positive but i want it to be in C format.. Can u pls tell me how i can do that

This is beacuse im trying to merge this file with one more file which contains values in C format..
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Oct 05, 2009 6:09 pm    Post subject:
Reply with quote

SyncSort returns a C sign for ZD instead of an F sign. DFSORT gives an F sign for TO=ZD. Try using TO=ZDF.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon Oct 05, 2009 9:31 pm    Post subject:
Reply with quote

Quote:
SyncSort returns a C sign for ZD instead of an F sign. DFSORT gives an F sign for TO=ZD. Try using TO=ZDF.


You're on the right track, but you have it a bit wrong for the OP's question.

The OP is using:

Code:

   OUTREC FIELDS=1:1,9,ZD,PD,LENGTH=5


That's equivalent to TO=PD, not TO=ZD. DFSORT gives a C sign for TO=PD whereas Syncsort gives an F sign. To ensure you get a C sign for both, you can use TO=PDC.
Back to top
View user's profile Send private message
narasimha.g

New User


Joined: 10 Sep 2009
Posts: 68
Location: Liverpool

PostPosted: Tue Oct 06, 2009 9:21 am    Post subject: Reply to: To convert Decimal to hexadecimal
Reply with quote

Hi
Thanks for the reply.. But my mainframe does not support DFSORTb utility.
And while using SYNCSORT with TO=PDF as u said in the previous reply its getting abended
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Tue Oct 06, 2009 9:42 am    Post subject:
Reply with quote

Hi,

see link http://ibmmainframes.com/viewtopic.php?t=28437&highlight=pdc


Gerry
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Tue Oct 06, 2009 3:00 pm    Post subject:
Reply with quote

Thank you Frank.
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Tue Oct 06, 2009 9:07 pm    Post subject:
Reply with quote

narasimha.g,

Support for TO=PDC was included in SyncSort for z/OS 1.3. You are apparently running an earlier release of SyncSort. For an alternate solution, check out the second to last post in the thread referenced by Gerry above. If you still have questions, please let me know.

Regards,
Alissa
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 -> JCL & VSAM 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