JGi604607here you go.....
Export is for V11.2 and above - but it should also work in 11.1 and perhaps in 10.
SCRI.DEACT.SOLUTION - the actual script
VARA.SQLI.GET_EH_STATUS - containig the T-SQL to fetch all RUN IDs from the current client
select TOP(100) eh_ah_idnr, eh_name, eh_status from EH where eh_client = &$CLIENT#
VARA.STATIC.DEACT.SOLUTION - a list of Status codes and actions (leave or decativate), will be extended with the
statuscode automatically - you just need to enter your desired action and re-run
VARA.STATIC.DEACTIVATION_ERRORS - if a deactivation was not successful, object and run id and RC will be entered here
the script gathers all objects from the activity window from the current client and compares it with the
settings in VARA.STATIC.DEACT.SOLUTION - if it should deactivate objects of the state or not (running and waiting objects
should be skipped)
then all objects will be deactivated that passed the check - if deactivation Error occur it will be written to
VARA.STATIC.DEACTIVATION_ERRORS. Sometimes Error 20292 appears, No Idea what this means - trying a bit later
everything runs fine, so I suppose, these objects are in a non-deactivateable state (even with FORCED)
to reduce performance impact I limited the SQL Result to 100 lines with TOP(100) feel free to change
You can execute the script in recurring mode, so it will handle bunches of 100 Objects -it can run 24/7
if you use ORACLE pls change the select to your needs, I think it would look like
select eh_ah_idnr, eh_name, eh_status from EH where eh_client = &$CLIENT# and ROWNUM <= 100
If objects are in a running state and should be deactivated, this will result in an error, for this my script
is not intended to run - if wanted it should be extended with a cancel_uc_object.
Open for Inputs and enhancement suggestions.
have fun :-)
Wolfgang
PS: Pls test prior to PROD in an TEST environment!