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

Reg COMP,COMP-3 and DISPLAY


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
srini_igsi
Currently Banned

New User


Joined: 09 Dec 2005
Posts: 30
Location: Pune

PostPosted: Mon Dec 12, 2005 3:25 pm
Reply with quote

Hi

1. When the source field PIC clause is S9(8) COMP-3, what shud be the PIC clause of the Target Field (If it is DISPLAY Usage).....?

2.When the source field PIC clause is S9(9) COMP, what shud be the PIC clause of the Target Field (If it is DISPLAY Usage).....?

3.When the source field PIC clause is S9(8) , what shud be the PIC clause of the Target Field (If it is COMP-3 Usage).....?

3.When the source field PIC clause is S9(7) , what shud be the PIC clause of the Target Field (If it is COMP Usage).....?

Thx in advance
Back to top
View user's profile Send private message
umeshkmrsh

New User


Joined: 21 Sep 2005
Posts: 79
Location: India

PostPosted: Mon Dec 12, 2005 6:29 pm
Reply with quote

Hi

1. The target field should be at least of size PIC S9(8).

2.The target field should be at least os size PIC S9(9).

3.The target field should be at least os size PIC S9(8) COMP-3.

4.The target field should be at least os size PIC S9(7) COMP.
Back to top
View user's profile Send private message
srini_igsi
Currently Banned

New User


Joined: 09 Dec 2005
Posts: 30
Location: Pune

PostPosted: Tue Dec 13, 2005 10:30 am
Reply with quote

thx umesh
Back to top
View user's profile Send private message
vrakeshmbt

New User


Joined: 17 Aug 2005
Posts: 30

PostPosted: Tue Dec 13, 2005 4:04 pm
Reply with quote

Srini,

i have a doubt, as comp-3 requires half a byte to store a digit the wht is the use of 9(8) in the first and third statement.
Back to top
View user's profile Send private message
umeshkmrsh

New User


Joined: 21 Sep 2005
Posts: 79
Location: India

PostPosted: Wed Dec 14, 2005 9:24 am
Reply with quote

Vrakesh,

COMP-3 requires have a byte to store each character, that's right.
But if the PIC clause is say 9(8) COMP-3, the bytes required to store will be 8/2 = 4 bytes.

If your doubt is something else please clarify it.
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 How to display the leading zeros of a... DB2 7
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
Search our Forums:

Back to Top