View previous topic :: View next topic
|
Author |
Message |
mubashshirji
New User
Joined: 14 Nov 2006 Posts: 16
|
|
|
|
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 |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
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 |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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 |
|
|
priyesh.agrawal
Senior Member
Joined: 28 Mar 2005 Posts: 1448 Location: Chicago, IL
|
|
|
|
Thanks Jack. |
|
Back to top |
|
|
jain.eti
New User
Joined: 23 Jan 2007 Posts: 25 Location: delhi
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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 |
|
|
|