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


Please Help Members By Posting Answers For Below Questions

What are INPUT PROCEDURE and OUTPUT PROCEDURE?

691


How do you reference the fixed block file formats from cobol programs

709


Write down the divisions of cobol program?

673


What are the pertinent COBOL

2047


How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?

2102






How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.

3724


What is cobol?

750


What is the difference between comp and comp-3?

704


what is the use of outrecord?

1774


What is the utilization of copybook in cobol?

657


what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.

8172


Explain how you can characterize tables in cobol?

644


How can you get the ksds file records into your cobol program?

646


A table has two indexes defined. Which one will be used by the SEARCH?

759


input 1 input2 ouput1 output2 output 3 1 re 300 1 re 200 1 re 300 3 rc 500 1 re 200 2 rr 400 1 re 300 2 rr 400 1 rc 400 3 rc 500 1 rc 400 2 rr 700 2 rr 700 5 tt 900 5 tt 900 2 inputs r in flat file and output 1 is matched records,ouptput2 is unmatched of input1,output3 is unmatched of input2! how vl u get the output files using sequential order and to check with each and every records! let me know the procedure division ?

1876