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 |
How many maximum number of procedures can we write in one COBOL program?
Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?
how to transfer the file from pc to mainframe??
In COBOL, what is the different between index and subscript?
0 Answers TryTechnicals Pvt Ltd,
How you can characterize tables in cobol?
Name the divisions in a COBOL program ?
What is the difference between a binary search and a sequential search what are the pertinent cobol?
How to find whether a Flat file is empty or not without Reading a file in COBOL Program. (not using JCL)
copy 100 records without using ibm utilities
What is level 66 used for ?
which certifications r 4 cobol,jcl,db2,cics what is format of xam n what is importance of these certifications... plz post answer only if u r sure... thanks
What do you understand by passing by reference and passing by content?