- Ever have a case were a job running for example, under QSECOFR authority, had an error message waiting but programmers and/or operators could not view the ACTIVE joblog because of insufficient authority?
- Ever had a time when a programmer or operator displayed objects in a library and could not find (see) them because of insufficient authority (i.e. owned by QSECOFR)
Two simple commands SEEJOB and SEEOBJ can solve this for you if you compile them under QSECOFR with USRPRF=*OWNER. Command line entry is not available and therefore protects against adopted authority issues.
SEEJOB ..corresponding command receives &JOB (required) and &USER (optional). Tip: Make sure you create commands that will not be created by IBM in the future. The prefix SEE is pretty safe. PGM PARM(&JOB &USER) DCL VAR(&JOB) TYPE(*CHAR) LEN(10) DCL VAR(&USER) TYPE(*CHAR) LEN(10) DCL VAR(&MSGID) TYPE(*CHAR) LEN(7) DCL VAR(&MSGDTA) TYPE(*CHAR) LEN(100) DCL VAR(&MSGF) TYPE(*CHAR) LEN(10) DCL VAR(&MSGFL) TYPE(*CHAR) LEN(10) MONMSG MSGID(CPF0000) EXEC(GOTO CMDLBL(ERROR)) /* JOB NAME ONLY PARM ............................................. IF (&USER = ' ') THEN(DO) DSPJOB JOB(&JOB) GOTO EXIT ENDDO /* JOB NAME AND USER GIVEN ........................................ DSPJOB JOB(&USER/&JOB) GOTO EXIT =================================================================
SEEOBJ ..corresponding command receives those required for DSPOBJD PGM PARM(&LIB &OBJ &TYPE) DCL VAR(&LIB) TYPE(*CHAR) LEN(10) DCL VAR(&OBJ) TYPE(*CHAR) LEN(10) DCL VAR(&TYPE) TYPE(*CHAR) LEN(7) DCL VAR(&MSGID) TYPE(*CHAR) LEN(7) DCL VAR(&MSGDTA) TYPE(*CHAR) LEN(100) DCL VAR(&MSGF) TYPE(*CHAR) LEN(10) DCL VAR(&MSGFL) TYPE(*CHAR) LEN(10) MONMSG MSGID(CPF0000) EXEC(GOTO CMDLBL(ERROR)) DSPOBJD OBJ(&LIB/&OBJ) OBJTYPE(&TYPE) GOTO CMDLBL(EXIT)
This was first published in September 1999