× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Ok, firstly i created a job queue: CRTJOBQ JOBQ(STUTOOLS/JOBSCDSAVE)
& added it to a batch subsystem:   ADDJOBQE SBSD(QGPL/QBATCH)
JOBQ(STUTOOLS/JOBSCDSAVE) MAXACT(1) SEQNBR(1000)
(The job queue is required to make sure only one save happens at a time
otherwise one save locks another etc.)

Next i created two CL's  (two for performance reasons).

JOBSCDEXIT

100-              PGM        PARM(&VARIABLE)
200-              DCL        VAR(&VARIABLE) TYPE(*CHAR) LEN(2000)
300-
/******************************************************************************/


400- /* THIS IS A TEST EXIT PROGRAM FOR ADDJOBSCDE, CHGJOBSCDE, &
RMVJOBSCDE       */
500-
/******************************************************************************/


600-              SBMJOB     CMD(CALL PGM(STU/JOBSCDSAVE)) +
700                            JOB(JOBSCDSAVE) JOBD(QGPL/QBATCH) +
800                            JOBQ(STUTOOLS/JOBSCDSAVE) USER(STU)  RTGDTA
(*JOBD)
900- ENDPGM

JOBSCDSAVE

100-              PGM
200-
/******************************************************************************/


300- /* THIS SAVES THE JOB SCHEDULE OBJECT
*/
400-
/******************************************************************************/


500-              SAVOBJ     OBJ(QDFTJOBSCD) LIB(QUSRSYS) DEV(*SAVF) +
600                            OBJTYPE(*JOBSCD) SAVF(QUSRSYS/JOBSCD) +
700                            CLEAR(*ALL) SAVACT(*SYSDFN)
800- ENDPGM

Secondly, add an exit program  to the Command Analyser Retrive exit point
for the three job schedule commands:

ADDEXITPGM EXITPNT(QIBM_QCA_RTV_COMMAND) FORMAT(RTVC0100) PGMNBR(*LOW) PGM
(STU/JOBSCDEXIT) PGMDTA(*JOB 20 'ADDJOBSCDEQSYS      ')

ADDEXITPGM EXITPNT(QIBM_QCA_RTV_COMMAND) FORMAT(RTVC0100) PGMNBR(*LOW) PGM
(STU/JOBSCDEXIT) PGMDTA(*JOB 20 'CHGJOBSCDEQSYS      ')

ADDEXITPGM EXITPNT(QIBM_QCA_RTV_COMMAND) FORMAT(RTVC0100) PGMNBR(*LOW) PGM
(STU/JOBSCDEXIT) PGMDTA(*JOB 20 'RMVJOBSCDEQSYS      ')


The CLs end up being called when you delete ANY userprofile.  There are no
other exit programs registered on QIBM_QCA_RTV_COMMAND, but there is one on
QIBM_QSY_DLT_PROFILE  DLTP0100  - QSYS/QYPSUSRPEX, and i've no idea what
this is!
Doing a job trace shows that the above programs are called when you delete
a userprofile, but its a bit over my head to understand why!  NB System
auditing is switched on on the system incase that makes any difference.

Regards
Stu






As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.