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 To Separate The Numerics From An Alphanumric Data Item Which Contains Both Alphabates And Numerics ?
what are difference organizations in cobol and access mode in cobol? can you expalin what organization means while declaring for ksds,esds,rrds?
can we use variable picture clause as xx.99 in cobol.
I want to declare a field with data type Double in my COBOL program. how shall i do that ?
how many times PARA-A is performed : PERFORM PARA-A VARYING TIMES-COUNTER FROM 1 BY 1 UNTIL TIMES-COUNTER >0 PARA-A MOVE P TO Q MOVE H TO TIMES COUNTER a.10 b.1 c.11 d.0
What does EXIT do ?
What is difference between COBOL and VS COBOL II?.
9(2).99 how many bytes take? Why . consider as a byte?
Please let me know how the Eject verb works for page break.. I want to know the code, how it is used.
what is internal sort and external sort ? which is preferable ?
How to remove 2 duplicate records and copy only one using job control language?
I hv ten records in ps file and i hv say some 15 records in vsam file .i hv empno and age in ps file n empno,empname,dept n desig in vsam file. i hv 2 read the ps file n check wid matching empno in vsam file and then insert all fields from ps and vsam into db2 table....plz help in writin the procedure division