Loading...
Select Version
This procedure compares two libraries.
All the members which exist in the newer library (NEW-LIB parameter) are deleted from the older library (OLD-LIB parameter).
/BEGIN-PARAMETER-DECLARATION /DECLARE-PARAMETER NAME=OLD-LIB(INITIAL-VALUE=*PROMPT) /DECLARE-PARAMETER NAME=NEW-LIB(INITIAL-VALUE=*PROMPT) /END-PARAMETER-DECLARATION /DECLARE-VARIABLE NAME=NEW-ELEMENTS(TYPE=*STRUC), - / MULTIPLE-ELEMENTS=*LIST ---------------------------------------- (1) /BEGIN-BLOCK DATA-INSERTION=*YES /START-LMS //SHOW-ELEM-ATTR - // ELEM=*LIB-ELEM(LIB=&NEW-LIB,ELEM=*ALL,TYPE=*ALL),- // INF=*MIN,STRUCTURE-OUTPUT=NEW-ELEMENTS ---------------------------------- (2) /DECLARE-VARIABLE NAME=LOOP(TYPE=*STRUC) ----------------------------------------- (3) /FOR LOOP=*LIST(NEW-ELEMENTS) //DELETE-ELEM *LIB-ELEM(LIB=&OLD-LIB, - // ELEM=&(LOOP.ELEM)(VERS=&(LOOP.VERSION)), - // TYPE=&(LOOP.TYPE)) -------------------------------------- (4) //STEP "if member in &OLD-LIB does not exist" /END-FOR //END /END-BLOCK
(1) | The variables for the output of //SHOW-ELEMENT-ATTRIBUTES are declared. |
(2) | The output of //SHOW-ELEMENT-ATTRIBUTES is placed in the variables. |
(3) | The loop variables are declared. |
(4) | The members in a loop are deleted; the values of the loop variables are used for member, version and type. |