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
 
Reg COMP,COMP-3 and DISPLAY

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Reg COMP,COMP-3 and DISPLAY
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    Post subject:
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    Post subject: Re: Reg COMP,COMP-3 and DISPLAY
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    Post subject: Reg COMP,COMP-3 and DISPLAY
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts COMP Variables Mismatch gayu7 COBOL Programming 5 Wed Dec 20, 2017 5:06 pm
No new posts Moving a COMP-3 Variable to a Numeric... ajayachander COBOL Programming 2 Thu Dec 14, 2017 5:46 pm
No new posts CONDITIONAL USING COMP-2 WITH PROBLEMS. JOSUEGENTIL COBOL Programming 7 Wed Nov 08, 2017 11:13 pm
No new posts how can i move s9(9) to s9(9) usage comp HARENDRA CHOUDHARY COBOL Programming 3 Mon Nov 06, 2017 12:10 am
No new posts display the sign only if the value is... useit DFSORT/ICETOOL 3 Wed Oct 04, 2017 5:53 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us