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?????
Answers were Sorted based on User's Feedback
Answer / dharma
U will not get SOC7 . but u will get unpredicatble results
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / dev
ABEND=S000 U4038 REASON=00000001. I have tested the program.
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / mdvasanth86
SOC 7 only when you do some arithmetic operation on it...
Displaying it will probably only give you unpredictable results.
HTH
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / piyush mani
i know soc7 abend should b the result but if i display var1 then program is running without any abend and output of program is absurd so i asked this question..
| Is This Answer Correct ? | 1 Yes | 0 No |
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 |
Explain about level numbers?
how to transfer the file from pc to mainframe??
What is the difference between structured cobol programming and object alternativelyiented cobol programming?
How will 128 be saved in s9 (3) comp-3 How will 12 be saved in s9 (2) comp
What R 2 of the common forms of the EVALUATE STATEMENT ?
What are the different data types available in COBOL?
what is the result of the following? DIVIDE A INTO B GIVING C. a.C=A/B b.the reminder of B/A is stored in C c.C=B/A d.the reminder of A/B is stored in C
perform I from 0 by 1 until I=5?How maney times it will executes
What are the steps you go through while creating a COBOL program executable?
How did the release of cobol/370 version 1.3 improve the performance of release 1.1?
what is the difference between Plan & package
describe 805 error