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
Write the code implementing the perform … varying.
How you can characterize tables in cobol?
how do you reference the variable block file formats from cobol programs
What are the different open modes available in cobol?
How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?
How did the release of cobol/370 version 1.3 improve the performance of release 1.1?
In COBOL programming, what is PERFORM? What is VARYING?
How do you reference the fixed block file formats from cobol programs
Describe the cobol database components?
Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?
Name the sections present in data division.
What is inspect in cobol ?
Write a program to enter and display the names of students in a class using the occurs clause.
What are INPUT PROCEDURE and OUTPUT PROCEDURE?
How do define dynamic array in cobol.