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



Suppose i have a variable with s9(18)v99 comp3 . what is the size of variable . If s9(18) comp3 is 1..

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

Suppose i have a variable with s9(18)v99 comp3 . what is the size of variable . If s9(18) comp3 is 1..

Answer / chaitu215

Memory related

Is This Answer Correct ?    5 Yes 5 No

Post New Answer

More COBOL Interview Questions

study the following code 01 A1 05 B PIC 99 05 C PIC X(4) 01 A2 05 B PIC 99V99 05 C PIC A(4) pick out the valid statement from the following a.A1 and A2 can not have sub-ordinates b.A1 and A2 can have the same sub-ordinates but must have same PIC clause c.there is nothing wrong d.A1 and A2 can have same sub-ordinates provided they are not at 01 level

4 Answers   TCS,


What are the different rules for performing sort operation?

0 Answers  


copy 100 records without using ibm utilities

3 Answers  


How to covert given string into ASCII value in COBOL/MF COBOL

3 Answers   CTS, IBM, iFlex,


Can we move X(9) to 9(9). If yes what are the ways for doing this?

3 Answers  






What is SDSF?

3 Answers  


What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?

0 Answers  


What rules are followed by the search verb.

0 Answers  


What are differences between COBOL and java ? why we are giving more preference to COBOL ?

3 Answers   TCS,


how many times PARA-A is performed : PERFORM PARA-A VARYING TIMES-COUNTER FROM 1 BY 1 UNTIL TIMES-COUNTER >0 PARA-A MOVE P TO Q MOVE H TO TIMES COUNTER a.10 b.1 c.11 d.0

4 Answers   TCS,


can any one give good example for cond 88 level number and for renames pls urgent dudes ?

3 Answers   DELL,


How to traceback if I am getting SOC7 or SOC4 abend? List down the steps

0 Answers  


Categories