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 |
What is the difference between Global and External Variables?
how can u redefine picx(10) with pic 9(6).
example for sub strings ? and refernce modifications whit output pls
0 Answers College School Exams Tests, IBM,
88 level entry is used for (a) data items in WORKING-STORAGE SECTION (b) items with RENAMES clause (c) condition-names (d) None of the above
what is the use of comp2 ? where can we use it with example ?
What will happen if you code GO BACK instead of STOP RUN in a stand alone COBOL program ?
8 Answers Arigo Infotech, IBM,
wht is the difference between goto and perform stmts
What are VS COBOL 11 special features?
How do you submit JCL via a Cobol program?
How many variables can be declared in w-s section.?
Can you REWRITE a record in an ESDS file? Can you DELETE a record from it?
6 Answers ABC, IBM, Mphasis, Wipro,
How to code fscode 10 in cobol program? Where yoy code in your pgm?give ans for the question.