/** * \brief Parameter Evaluation Example * * \author Mihael Schmidt * * \param power of 2 number (0 - 63) as alphanumeric */ H dftactgrp(*no) actgrp(*caller) *------------------------------------------------------------------------- * PEP *------------------------------------------------------------------------- D main PR extpgm('PARM01') D parm 3A D main PI D parm 3A *------------------------------------------------------------------------- * Prototypes *------------------------------------------------------------------------- /copy PARMEVAL_H *------------------------------------------------------------------------- * Constants *------------------------------------------------------------------------- D PARM_SEL_1 C 1 D PARM_SEL_2 C 2 D PARM_SEL_3 C 4 D PARM_SEL_4 C 8 D PARM_SEL_5 C 16 D PARM_SEL_6 C 32 *------------------------------------------------------------------------- * Variables *------------------------------------------------------------------------- D parmSelDs DS D parm1Sel N D parm2Sel N D parm3Sel N D parm4Sel N D parm5Sel N D parm6Sel N D parmSel 6A overlay(parmSelDs) /free if (%parms() = 1); parmSel = evalParm(%int(parm)); else; parmSel = evalParm(PARM_SEL_1 + PARM_SEL_5); endif; exsr displaySelectedParms; *inlr = *on; return; begsr displaySelectedParms; if (parm1Sel); dsply 'Parameter 1 is selected.'; endif; if (parm2Sel); dsply 'Parameter 2 is selected.'; endif; if (parm3Sel); dsply 'Parameter 3 is selected.'; endif; if (parm4Sel); dsply 'Parameter 4 is selected.'; endif; if (parm5Sel); dsply 'Parameter 5 is selected.'; endif; if (parm6Sel); dsply 'Parameter 6 is selected.'; endif; endsr; /end-free