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 are the different data types in cobol?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
What are literals?
What is the difference between Global and External Variables?
how do you define single dimensional array and multidimensional array in your cobol?
How can you get the ksds file records into your cobol program?
i need a small 3d program using inline and outline.
What is the difference between comp and comp-3 usage?
How do you reference the fixed block file formats from cobol programs
What are 77 levels used for?
What is the LINKAGE SECTION used in COBOL?
What is cobol?
how do you reference the esds vsam file formats from cobol programs
What do you understand by psb and acb?
What is the local-storage section?