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
Answers were Sorted based on User's Feedback
Answer / 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 |
How can you declare the file ?
how will u find out 3rd week's 2nd day using occurs ?
What will happen if you code GO BACK instead of STOP RUN in a stand alone COBOL program ?
8 Answers Arigo Infotech, IBM,
Why occurs cannot be used in 01 level in COBOL?
SSRange is used to do a range check on which of the Following. SUBSCRIPT,INDEX,REFERENCE MODIFICATION,Run-time option.
In a file if a column account number conatain value 0001234.. how can we move the value to another variable without zero. value may contain any type such as 00123405. we need the value 1234 or 12305. how can we do that in cobol. Please help.
how to access the file from prodution from changeman tool and to submit a file to production
i have variable record in the 5th, i want to sort from 5th filed ? how ?
Explain the configuration section of a cobol program with examples of syntax.
What is ASKTIME, SUSPEND
give the examples for strings and unstrings in cobol
Suppose i want to declare a binary comp fild of 7 byte .how to write?