The IMPORT and EXPORT keywords let you share data among the procedures in
a program without explicitly passing the data as parameters — in other words,
they provide a “hidden interface” between procedures.
PGM - EXP_IMP1
d Var1 S 5p 0 Export Inz(3)
c Var1 dsply r 1
c callb 'EXP_IMP1'
c Var1 dsply r
c return
PGM - EXP_IMP1
d Var1 S 5p 0 Import
c Var1 dsply r 1
c z-add 77 Var1
c Var1 dsply r
c return
THEN USE
CRTRPGMOD OR PDM OPTION 15 TO CREATE MODULE
THEN
CRTPGM PGM(LIB/PGM_NAME) MODULE() ()
Last Wiki Answer Submitted: August 27, 2008 9:35 am by 062750 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.