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 |
can we display comp-3 variables. if we want to display what we have to do . give me one example
how do you reference the ksds vsam file formats from cobol programs
how to transfer the file from pc to mainframe??
What R 2 of the common forms of the EVALUATE STATEMENT ?
In an EVALUTE statement is the order of the WHEN clauses significant?
can we use reference modification an arry.
Consider the following COBOL entries: 05 X PIC 99 VALUE 10. SUBTRACT 20 FROM X. The resultant value of X wil be
how can i see junk values in dclgen or in hostvariable of comp ?
When the working storage variables get allocated? a.At Compile time b.At starting of the run time c.At end of the run time. d.None of these
how do you reference the fixed unblock file formats from cobol programs
Why would you use find and get rather than to obtain?
How To Separate The Numerics From An Alphanumric Data Item Which Contains Both Alphabates And Numerics ?