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
 
What is the maximum limit for length for a COBOL copybook

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

New User


Joined: 14 Nov 2006
Posts: 16

PostPosted: Thu Nov 16, 2006 11:26 am    Post subject: What is the maximum limit for length for a COBOL copybook
Reply with quote

1. What is the maximum limit for length for a COBOL copybook?
2. What is internal storage for COMP and COMP-3 for a value "12547"?
3. What is maximum value (in bytes and value) that can be passed from jcl to COBOL thru parm
4. What is maximum value (in bytes and value) that can be passed from jcl to COBOL thru sysin?..
5. How many values can be acceptable in one ACCEPT in COBOL..
Back to top
View user's profile Send private message

priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Sun Nov 19, 2006 9:57 pm    Post subject: Re: What is the maximum limit for length for a COBOL copyboo
Reply with quote

Quote:
2. What is internal storage for COMP and COMP-3 for a value "12547"?

COMP is compiler dependent... where as COMP-3 would store it in Hex format.
Quote:
3. What is maximum value (in bytes and value) that can be passed from jcl to COBOL thru parm

100
Quote:
4. What is maximum value (in bytes and value) that can be passed from jcl to COBOL thru sysin?..

256... I guess, might want to check...
Quote:
5. How many values can be acceptable in one ACCEPT in COBOL..

One.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Mon Nov 20, 2006 2:42 am    Post subject:
Reply with quote

Hi,

Quote:
2. What is internal storage for COMP and COMP-3 for a value "12547"?


COMP 2 bytes
COMP-3 3 bytes

HI Priyesh,

As far as I know, the memory allocated isn't compiler dependent but the # of accessable digits may be restricted to the PIC digits depending on the comiler option selected at compile time.
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Mon Nov 20, 2006 6:30 am    Post subject: Re: What is the maximum limit for length for a COBOL copyboo
Reply with quote

Thanks Jack.
Back to top
View user's profile Send private message
jain.eti

New User


Joined: 23 Jan 2007
Posts: 25
Location: delhi

PostPosted: Sat Feb 03, 2007 9:48 pm    Post subject:
Reply with quote

What is internal storage for COMP and COMP-3 for a value "12547"?


COMP - 4 bytes ( as comp takes 4 bytes for (s9(05) - s9(09))
COMP-3 3 bytes


correct me if i am wrong.....
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sun Feb 04, 2007 6:52 am    Post subject:
Reply with quote

Hello,

Quote:
Quote:
4. What is maximum value (in bytes and value) that can be passed from jcl to COBOL thru sysin?..

256... I guess, might want to check...


If you read from a SYSIN DD statement there basically is NO limit to the volume of data. "Bytes and value" are not relevant when reading data from a DD.

If i misunderstood the question, please let me know.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sun Feb 11, 2007 9:23 am    Post subject:
Reply with quote

Hi Jain,

Finally got the energy to ans this:
Quote:
COMP - 4 bytes ( as comp takes 4 bytes for (s9(05) - s9(09))

In a way we're both right. It depends on the TRUNC option selected at compile time.

If TRUNC(BIN) then I'm right. If any other, you are.

Example: even if my field, using TRUNC(BIN), was defined as PIC 9 COMP it will accept a value up to 32767.
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 values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
This topic is locked: you cannot edit posts or make replies. Selecting two copybooks of different ... Vignesh Sid COBOL Programming 8 Tue Sep 05, 2017 7:28 pm
This topic is locked: you cannot edit posts or make replies. Limit access to certain RACF group cvnlynn CLIST & REXX 5 Wed Aug 23, 2017 2:28 am
No new posts Can we limit length in concatenation ... balaji81_k DB2 7 Tue Aug 22, 2017 2:50 am

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