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
 
Comp 4 - Binary Variable

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
Sumeendar

New User


Joined: 31 Jan 2006
Posts: 39

PostPosted: Tue May 15, 2012 3:48 pm    Post subject: Comp 4 - Binary Variable
Reply with quote

Hi

This is regarding COMP-4 (Binary) variables.

I have comp-4 variable declared as below

77 subh pic 9(4) comp-4.

Kindly let me know what will be maximium value this field (subh) can accomodate.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Tue May 15, 2012 3:51 pm    Post subject: Reply to: Comp 4 - Binary Variable
Reply with quote

Have you looked in the manual (link at the top of the page), and what didn't you understand?

The answer also depends on Compile option TRUNC, so look at that as well.
Back to top
View user's profile Send private message
Naish

New User


Joined: 07 Dec 2006
Posts: 82
Location: UK

PostPosted: Tue May 15, 2012 4:05 pm    Post subject:
Reply with quote

icon_smile.gif

http://ibmmainframes.com/viewtopic.php?t=58071&highlight=comp4
Back to top
View user's profile Send private message
Sumeendar

New User


Joined: 31 Jan 2006
Posts: 39

PostPosted: Tue May 15, 2012 4:11 pm    Post subject: Reply to: Comp 4 - Binary Variable
Reply with quote

As my variable is

77 subh PIC 9(4) comp-4.

I believe here subh will occupy 2 bytes only. If so maximum number of digits field subh can accomodate is 1 to 4.

Kindly let me know if this is correct
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Tue May 15, 2012 4:18 pm    Post subject: Reply to: Comp 4 - Binary Variable
Reply with quote

Well, if you now want to know the maximum digits, then no, you are wrong.

As Naish has pointed you to your other post on the subject and you've not cracked it from that, I don't know what we can do that will be much use to you in an interview.
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 -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
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 Move from Comp3 variable to Edited Va... Revathy.nair0485 COBOL Programming 7 Fri Nov 03, 2017 3:30 pm
This topic is locked: you cannot edit posts or make replies. Can a alphanumeric data be moved to a... nico_neoz COBOL Programming 10 Mon Oct 30, 2017 8:28 am

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