Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 7306

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: 7306

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 Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts resume binary ftp in z/os meykh2014 All Other Mainframe Topics 6 Sun Jan 22, 2017 10:01 am
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us