ID DIVISION.
PROGRAM-ID. PLO.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 VAR1 PIC 9(2).
01 VAR2 PIC X(2).
PROCEDURE DIVISION.
ACCEPT VAR2.
MOVE VAR2 TO VAR1.
STOP RUN.

if i give 'PI' in var2 then what will b output of progr.
any abend?????

Answer Posted / dimpy19

No abend
but unpredictable result

WORKING-STORAGE SECTION.
01 VAR1 PIC 9(2).
01 VAR2 PIC X(2).
PROCEDURE DIVISION.
ACCEPT VAR2.
MOVE VAR2 TO VAR1.
DISPLAY VAR1.
DISPLAY VAR2.
STOP RUN.


//STEP02 EXEC PGM=COB7
//STEPLIB DD DSN=DEA.SIQAGH.LOAD,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
PI
/*



output
P9
PI

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to convert the recors form vsam file to db2 table tru file aid

2763


Name the divisions, which are available in a cobol program?

685


What are the access modes of START statement?

719


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

2105


What is the default value(s) for an initialize? What keyword will allow for an override of the default?

661






What is the difference between comp and comp-3 usage?

678


Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?

823


How do you reference the fixed block file formats from cobol programs

703


When is inspect verb is used in cobol?

673


Which mode is used to operate the sequential file?

667


How you can read the file from bottom?

660


I have a File that has duplicate records. I need only those records that occur more than thrice.?

8653


What is the difference between external and global variables in COBOL?

813


INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?

421


Define static linking and dynamic linking.

664