IBM Assembler Question:
How to retrieve the instream data in SYSIN?
Answers:
Answer #1Use Accept in procedure division.
Example :
WORKING-STORAGE SECTION.
01 empno. Pic x(05).
01 empname pic x(15).
01 empsal pic 9(10).
PROCEDURE DIVISION.
................
PERFORM ACCEPT-PARA.
..............
ACCEPT-PARA.
ACCEPT EMPNO.
ACCEPT EMPNAME.
ACCEPT EMPSAL.
In JCL :
...........
............
//sysin dd *
001
aaaa
330000
/*
Example :
WORKING-STORAGE SECTION.
01 empno. Pic x(05).
01 empname pic x(15).
01 empsal pic 9(10).
PROCEDURE DIVISION.
................
PERFORM ACCEPT-PARA.
..............
ACCEPT-PARA.
ACCEPT EMPNO.
ACCEPT EMPNAME.
ACCEPT EMPSAL.
In JCL :
...........
............
//sysin dd *
001
aaaa
330000
/*
Answer #2See question 18
The previous answer is wrong - a COBOL solution has been given, not Assembler
The previous answer is wrong - a COBOL solution has been given, not Assembler
Previous Question | Next Question |
Can we use an equated value as operand for an MVC instruction? Reason for the same? | How to Pass the parameters from JCL to assembler Pgm? |