ChangeMan ZMF uses the CMN$$VAR skeleton to set various skeleton variables used within staging jobs (only). This solution introduces a similar skeleton, ASZ$$VAR, which can be used (embedded) in any phase in the ChangeMan ZMF lifecyle for which a job is submitted.
Skeleton ASZ$$VAR refers to a skeleton variable &ASZSKLNM (= 'skeleton name') with possible values like:
CMN$$CKO (checkout)
CMNSTAGE (stage)
CMN$$RPM (promote or demote)
CMN10 (distribute)
CMN20 (install)
CMN20T (temp install)
CMN30 (baseline ripple)
CMN31T (TCC)
CMN50 (backout)
CMN55 (reverse baseline ripple)
That way, the value of &ASZSKLNM reflects the phase in the ChangeMan ZMF lifecyle for which a job is submitted.
You can then use (embed) ASZ$$VAR in skeletons like CMN$$CKO, any staging skeleton, CMN$$PRM, CMN10, CMN20(I), CMN30(I), CMN50(I) and CMN55(I). Based on the value of &ASZSKLNM, you can then have ASZ$$VAR set any desired skeleton variable and assign it the appropriate value.
If needed, you can further extend this technique to DB2 option skeletons also (CMN21, CMN49, CMN32, CMN56).