Suppose i have a variable with s9(18)v99 comp3 . what is the size of variable . If s9(18) comp3 is 10 bytes . There should be some difference between two allocations ?
Thanks
krishna chaitanya
Answer Posted / abi
ID DIVISION.
PROGRAM-ID. PA.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
*01 B PIC X(20) VALUE ALL '1'.
01 A PIC S9(18)V99 COMP-3.
PROCEDURE DIVISION.
MAIN-PARA.
MOVE 1111111111111111111 TO A.
DISPLAY A.
STOP RUN.
********************** Bottom of Dat
when we are executed this program we got it following
discription.
*More than 18 digit positions were specified in
a "PICTUURE" string for a numeric or numeric edited item.
A "PICTURE" string of "S9(18)" was assumed
.
* Numeric literal "1111111111111111111" was longer than
than the maximum allowed length. The literal was truncated
to "111111111111111111".
Is This Answer Correct ? | 6 Yes | 4 No |
Post New Answer View All Answers
What is the difference between structured cobol programming and object alternativelyiented cobol?
What is the Purpose of Pointer in the string?
Write the code implementing the perform … varying.
What is amode(24)?
If you are current on the owner of a set, what is the difference between obtain next and obtain first?
How to traceback if I am getting SOC7 or SOC4 abend? List down the steps
i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
What are the different rules to perform a Search?
Explain what you understand by passing by value.
i want a program using by if, evaluate , string, unstring, perform, occurs?
What is static and dynamic call in cobol?
Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?
What is inspect in cobol ?
How do you reference the following file formats from cobol programs?