PROCEDURE CALLING TWO
SUBPROCEDURES
PRA1/QRPGLESRC
TWOSUBPROC
0000.01
DA S 3
0
0000.02
DB S 3
0
0000.03
DS S 3
0
0000.04
DG S 3
0
0000.05
DSUBPR1 PR 3
0
0000.06
DA 3 0
0000.07
DB 3 0
0000.08
Dres1 S 3
0
0000.09
DSUBPR2 PR 6
0
0000.10
DS 3 0
0000.11
DG 3 0
0000.12
Dres2 s 6
0
0000.14
C EVAL A=7
0000.15
C EVAL B=4
0000.16
C EVAL
res1=SUBPR1(A:B)
0000.17
C res1 DSPLY
0000.18
C EVAL G=2
0000.19
C EVAL S=res1
0000.20
C EVAL res2=SUBPR2(S:G)
0000.21
C res2 DSPLY
0000.22
c eval *inlr=*on
0000.23
C RETURN
0000.24
PSUBPR2 B
0000.25
DSUBPR2 PI 6
0
0000.26
DS 3 0
0000.27
DG 3 0
0000.28
DZ S 6
0
0000.29
C EVAL Z=S*G
0000.30
C RETURN Z
0000.31
PSUBPR2 E
0001.00
PSUBPR1 B
0002.00
DSUBPR1 PI 3
0
0002.01
DA 3 0
0002.02
DB 3 0
0005.00
DC S 3
0
0006.00
C EVAL C=A+B
0007.00
C RETURN C
0008.00
PSUBPR1 E
output is :-
DSPLY 11
DSPLY 22
No comments