Suppose i want to declare a binary comp fild of 7 byte .how
to write?
Answers were Sorted based on User's Feedback
Answer / i go crazy
Hi Suv,
If u code S9(14) COMP, it will take double word i.e. 8
bytes. Below is the size of comp variables.
S9(01) - S9(04) : 2 BYTES.
S9(05) - S9(09) : 4 BYTES.
S9(10) - S9(18) : 8 BYTES.
Is This Answer Correct ? | 14 Yes | 0 No |
Answer / tata
if we use comp3(packed decimal)
declare like 01 a pic s9(13)comp3.
13/2=6.5 and s takes extrahalf byte.
that is 6.5+0.5=7.
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / suv
If your question is like this:::
Suppose i want to declare a binary COMP field of storage 7
bytes .how
to write?
Answer is:
PIC S9(14) COMP.
storage byte required by COMP field will = half of the
digit specified in the PIC clause.
Just an info....
storage byte required by COMP3 field will = ( half of the
digit specified in the PIC clause)+1
Please correct me if I am wrong.
Is This Answer Correct ? | 6 Yes | 6 No |
Answer / ankit
hi i think you cannot declare binary comp of 7 bytes
exactly as the comp variable are fixed to half(2 bytes)
word,full word(4 bytes) and double word(8 bytes), so you
need to choose the paricular comp variable to use ok
correct me if i am wrong
Is This Answer Correct ? | 1 Yes | 2 No |
01 a pic 9(9v99) 01 b pic 9(9.99) wht will be the stored vales in both cases
How to traceback if I am getting SOC7 or SOC4 abend? List down the steps
How many variables can be declared in w-s section.?
What is inspect in cobol ?
What are the pertinent COBOL
created cluster using IDCAMS ..that is empty ..when i write a program for read using Input ..wil it open the cluster or gives any error?
What is file status 92?
i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?
In COBOL CALL-CALLING,if a program A is calling 3 sub- programs, dynamically, then it is said sub-programs will always will always in Initial Mode. My question is : Do we need to code CANCEL or (IS INITIAL) for dynamically called sub-programs or it is the property of Dynamically called pgms so every time sub-pgms are called they will be in initial mode. ***This question is only Dynamic call****, Please reply. Thank you in advance.
How to read a record from bottom of a file which is indexed by 'A'.
. How do we cast a variable in COBOL
What is difference between COBOL and VS COBOL II?.