|
<snip> Is there any way to limit who can sign on to a particular console </snip> My favorite technique is to use a routing program on the subsystem. The default routing program is usually QCMD. Replace that program that does roughly the following: Is the profile QSECOFR, QSYSOPR, QSRV allow Is the profile user class *SECOFR, *SYSOPR, allow Anyone else, put up a nice screen that says, no thank you and upon any function key sign them off. Then do the functions that QCMD has to do. Here is a sample program I talk about at COMMON. It does basically what you ask, except if you are not one of the anointed, then it sends you to another subsystem. The complete documentation and a copy of the code, subsystem descriptions, etc is available on the COMMON web site. Look for the Advanced Work Management session. If you don't find it contact me directly and I will send it to you. PGM DCLF FILE(NOACTDSP) DCL &ACGCDE *CHAR LEN(15) DCL &ATNPGM *CHAR LEN(10) DCL &ATNPGMALL *CHAR LEN(20) DCL &ATNPGMLIB *CHAR LEN(10) DCL &CTLSBSD *CHAR LEN(20) DCL &DEVICE *CHAR LEN(10) DCL &INLMNU *CHAR LEN(10) DCL &INLMNULIB *CHAR LEN(10) DCL &INLPGM *CHAR LEN(10) DCL &INLPGMLIB *CHAR LEN(10) DCL &MSGQ *CHAR LEN(10) DCL &NBR *CHAR LEN(6) DCL &TYPE *CHAR LEN(1) DCL &USER *CHAR LEN(10) DCL &USRCDE *CHAR LEN(3) DCL &USRCLS *CHAR LEN(10) MONMSG MSGID(CPF1357 CPF1373) RTVUSRPRF INLPGM(&INLPGM) INLPGMLIB(&INLPGMLIB) + ACGCDE(&ACGCDE) USRCLS(&USRCLS) + ATNPGM(&ATNPGM) ATNPGMLIB(&ATNPGMLIB) + INLMNU(&INLMNU) INLMNULIB(&INLMNULIB) RTVSYSVAL SYSVAL(QCTLSBSD) RTNVAR(&CTLSBSD) CHGVAR VAR(&CTLSBS) VALUE(%SST(&CTLSBSD 1 10)) RTVJOBA JOB(&DEVICE) USER(&USER) NBR(&NBR) TYPE(&TYPE) CHGVAR &USRCDE VALUE(%SST(&ACGCDE 13 3)) IF COND(&USRCDE *EQ ' ') THEN(DO) IF COND(&USRCLS *EQ '*SYSOPR') THEN(DO) CHGVAR &JOBQ VALUE('SYSOPR') TFRJOB JOBQ(SYSOPR) MONMSG MSGID(CPF1364) EXEC(DO) SNDRCVF RCDFMT(R3DC) TFRJOB JOBQ(&CTLSBS) ENDDO ENDDO ELSE CMD(IF COND(&USRCLS *EQ '*SECOFR') THEN(DO)) CHGVAR &JOBQ VALUE('SYSOPR') TFRJOB JOBQ(SYSOPR) MONMSG MSGID(CPF1364) EXEC(DO) SNDRCVF RCDFMT(R3DC) TFRJOB JOBQ(&CTLSBS) ENDDO ENDDO ELSE CMD(IF COND(&USRCLS *EQ '*SECADM') THEN(DO)) CHGVAR &JOBQ VALUE('SYSOPR') TFRJOB JOBQ(SYSOPR) MONMSG MSGID(CPF1364) EXEC(DO) SNDRCVF RCDFMT(R1DC) GOTO NOSBSERR ENDDO ENDDO ELSE CMD(IF COND(&USRCLS *EQ '*USER') THEN(DO)) TFRJOB JOBQ(QINTER) MONMSG MSGID(CPF1364) EXEC(DO) SNDRCVF RCDFMT(R1DC) GOTO NOSBSERR ENDDO ENDDO ENDDO ELSE CMD(DO) CHGVAR &JOBQ VALUE('INT' *CAT &USRCDE) TFRJOB JOBQ(&JOBQ) MONMSG MSGID(CPF1364) EXEC(DO) SNDRCVF RCDFMT(R1DC) GOTO NOSBSERR ENDDO ENDDO IF (&TYPE *EQ '1') THEN(DO) IF (&ATNPGM *EQ '*SYSVAL') THEN(DO) RTVSYSVAL QATNPGM RTNVAR(&ATNPGMALL) CHGVAR &ATNPGM VALUE(%SST(&ATNPGMALL 1 10)) CHGVAR &ATNPGMLIB VALUE(%SST(&ATNPGMALL 11 10)) ENDDO IF (&ATNPGM *EQ '*ASSIST') THEN(DO) CHGVAR &ATNPGM VALUE(QEZMAIN) CHGVAR &ATNPGMLIB VALUE(QSYS) ENDDO IF (&ATNPGM *NE '*NONE') THEN(DO) SETATNPGM &ATNPGMLIB/&ATNPGM ENDDO IF (&INLPGM *NE '*NONE') THEN(DO) CALL &INLPGMLIB/&INLPGM ENDDO START: IF (&INLMNU *NE '*SIGNOFF ') THEN(DO) GO &INLMNULIB/&INLMNU ENDDO IF (&INLMNU *EQ '*SIGNOFF ') THEN(DO) SIGNOFF ENDDO GOTO START ENDDO CHGJOB LOG(0 *SAME *NOLIST) Return NOSBSERR: CHGVAR &MSGQ VALUE(QSYSMSG) CHKOBJ &MSGQ OBJTYPE(*MSGQ) MONMSG CPF9801 EXEC(CHGVAR &MSGQ VALUE(*SYSOPR)) SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('User + profile' *BCAT &USER *BCAT 'unable to + connect to subsystem' *BCAT &JOBQ) + TOMSGQ(&MSGQ) SIGNOFF ENDPGM Jim Oberholtzer Senior Solutions Architect Computech Resources, Inc.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.