MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Convert Decimal into Binary

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
gharidoss
Beginner


Joined: 14 Mar 2005
Posts: 38
Topics: 15
Location: Bangalore

PostPosted: Wed Mar 22, 2006 12:39 am    Post subject: Convert Decimal into Binary Reply with quote

Hi,

I need to convert the Decimal value into Binary for specfic fields. But I got S0C7. Please let me know my mistakes on this?

I tried two ways.

Code:

SORT FIELDS=COPY                     
OUTREC FIELDS=(1,3,PD,TO=BI,LENGTH=4)


Code:

SORT FIELDS=COPY                     
OUTREC FIELDS=(1,3,PD,TO=BI)



Thanks in advance
Hari
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Wed Mar 22, 2006 1:29 am    Post subject: Reply with quote

gharidoss,

PD - refers to Packed Decimal (Comp-3 Variable). What do you mean when you say Decimal value ? Normal Decimal S9(n)v99 without COMP-3 or WITH COMP-3?

Try this if you are using normal decimal without COMP-3 (ZD stands for Zoned Decimal)
Code:

 SORT FIELDS=COPY
 OUTREC FIELDS=(1,3,ZD,TO=BI)


Thanks,
Phantom
Back to top
View user's profile Send private message
gharidoss
Beginner


Joined: 14 Mar 2005
Posts: 38
Topics: 15
Location: Bangalore

PostPosted: Wed Mar 22, 2006 2:44 am    Post subject: Reply with quote

Hi Phantom,

Thanks for the reply...

My requirement is Zoned Decimal. it's working fine.


Thanks,
Hari
_________________
http://mainframe-world.com
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Wed Mar 22, 2006 11:06 am    Post subject: Reply with quote

See Appendix C of "z/OS DFSORT Application Programming Guide" for info on the various DFSORT formats and how they relate to COBOL formats.

You access "z/OS DFSORT Application Programming Guide" online from:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
gharidoss
Beginner


Joined: 14 Mar 2005
Posts: 38
Topics: 15
Location: Bangalore

PostPosted: Thu Mar 23, 2006 3:15 am    Post subject: Reply with quote

Hi Frank,

Thanks for your help...

Thanks,
Hari
_________________
http://mainframe-world.com
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group