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

Movement from S9(09) COMP-3 to 9(10)


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
geeta.mishra

New User


Joined: 27 Dec 2005
Posts: 21
Location: Bangalore

PostPosted: Tue Jun 06, 2006 8:09 pm
Reply with quote

Hi,
I am not able to move from S9(09) COMP-3 to 9(10) when the value of S9(09) COMP-3 = 1234567890, the digit "1" is getting truncated( the value is coming to 234567890) Please help.

Geeta
Back to top
View user's profile Send private message
calspach

New User


Joined: 05 May 2006
Posts: 32
Location: USA

PostPosted: Tue Jun 06, 2006 9:22 pm
Reply with quote

Your value is getting truncated in the s9(9) comp-3, not in the move. 1234567890 is ten digits, s9(9) comp-3 or otherwise can only hold 9 digits.
Back to top
View user's profile Send private message
chk_25

New User


Joined: 09 Jun 2006
Posts: 2
Location: India

PostPosted: Fri Jun 09, 2006 11:17 pm
Reply with quote

In S9(9) comp-3, the maximum data size it can hold is 5bytes( Here five digits). But u have stated that it will hold 9 digits.

plz clear my doubt.

CHETAN KUMAR
Back to top
View user's profile Send private message
calspach

New User


Joined: 05 May 2006
Posts: 32
Location: USA

PostPosted: Fri Jun 09, 2006 11:30 pm
Reply with quote

an S9(9) comp-3 data fields holds 9 digits of numerical data, and a sign. It does this by storing two digits per byte, with the least significant byte of data holding one digit and the sign of the entire data field.


Check here for a more detailed description of how comp-3 data items are stored.

www.discinterchange.com/TechTalk_Packed_fields_.html
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Converting ASCII values to COMP-3 (ZD... JCL & VSAM 2
No new posts Interviewers are surprised with my an... Mainframe Interview Questions 6
No new posts Cobol COMP-2 fields getting scrambled... Java & MQSeries 6
No new posts convert alphanumeric PIC X(02) to hex... COBOL Programming 3
Search our Forums:

Back to Top