How can we delete the source of a program in a programmer's private library when the element is moved from Stage 1 to Stage 2?
search cancel

How can we delete the source of a program in a programmer's private library when the element is moved from Stage 1 to Stage 2?

book

Article ID: 66845

calendar_today

Updated On:

Products

Endevor Endevor Natural Integration Endevor - ECLIPSE Plugin Endevor - Enterprise Workbench

Issue/Introduction

We have a need to delete the source program when we move it from stage 1 to stage 2. When our users Add a program to stage 1, they tell Endevor to not delete the source program from their private library.  Then when they Move it from stage 1 to stage 2, they want the element deleted from stage 1 AND at the same time, also delete the source program from their private library. Is there a way to do this in Endevor?

Environment

All Supported Releases

Resolution

The Delete Processor can be updated to include IF/THEN/ELSE logic that checks if it is Move action (&C1ACTION) from a specific Environment and stage (&C1ENVMNT and &C1STGNUM), and executes a CONDELE utility step that deletes the element from the data set of the Add or Update request (&C1USRDSN).

// IF (&C1ACTION=MOVE)  THEN
//DEL1   EXEC PGM=CONDELE,PARM='&C1ELEMENT',          
//       EXECIF=((&C1ENVMNT,EQ,envname),(&C1STGNUM,EQ,1))               
//C1LIB  DD DSN=&C1USRDSN,DISP=SHR
// ENDIF 

Additional Information

&C1ENVMNT (&C1TENVMNT) (&C1EN) (8) - Name of the current environment.
&C1STGNUM (&C1TSTGNUM) (&C1S#) (1) - Number of the current stage.
&C1USRDSN (44) - Data set name of the source for ADD or UPDATE requests