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

To convert Decimal to hexadecimal


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Mon Oct 05, 2009 5:07 pm
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
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

Superior Member


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

PostPosted: Mon Oct 05, 2009 6:09 pm
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 Developer


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

PostPosted: Mon Oct 05, 2009 9:31 pm
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
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: 1702
Location: Australia

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

Hi,

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


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

Superior Member


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

PostPosted: Tue Oct 06, 2009 3:00 pm
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: 496
Location: USA

PostPosted: Tue Oct 06, 2009 9:07 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


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