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
how to convert the recors form vsam file to db2 table tru file aid
Name the divisions, which are available in a cobol program?
What are the access modes of START statement?
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
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
What is the difference between comp and comp-3 usage?
Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?
How do you reference the fixed block file formats from cobol programs
When is inspect verb is used in cobol?
Which mode is used to operate the sequential file?
How you can read the file from bottom?
I have a File that has duplicate records. I need only those records that occur more than thrice.?
What is the difference between external and global variables in COBOL?
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
Define static linking and dynamic linking.