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
 

 

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
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm
No new posts Length of Tape file Mohan Kothakota JCL & VSAM 9 Thu Apr 20, 2017 10:24 pm


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