×
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.
Bob,
Is there a way to find out what user i.d.'s are NOT set up in the System
Directory?
Depending on what you want to do...we run a program once every day to add
directory entries. We do this in order to get "valid" email addresses. We
just ignore the 'already exists' message. I'm sure there is a more elegant
way to do this, but this will work for its purpose. Short and sweet; it
looks like this:
PGM
DCL VAR(&EMAIL) TYPE(*CHAR) LEN(15)
DCL VAR(&SYSNAME) TYPE(*CHAR) LEN(8)
DCL VAR(&USRNAME) TYPE(*CHAR) LEN(8)
DCLF FILE(QADSPUPB)
RTVNETA SYSNAME(&SYSNAME)
DSPUSRPRF USRPRF(*ALL) OUTPUT(*OUTFILE) +
OUTFILE(QTEMP/USRPRF)
OVRDBF FILE(QADSPUPB) TOFILE(QTEMP/USRPRF)
TRY1AGN: RCVF
MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(END))
IF COND(%SST(&UPUPRF 1 1) = 'Q') THEN(GOTO +
CMDLBL(TRY1AGN))
CHGVAR VAR(&USRNAME) VALUE(&UPUPRF)
CHGVAR VAR(&EMAIL) VALUE('AS400' *CAT &UPUPRF)
ADDDIRE USRID(&USRNAME &SYSNAME) USRD(&UPTEXT) +
USER(&UPUPRF) USRDFNFLD((SMTPAUSRID SMTP +
&email) (SMTPDMN SMTP +
'DOMAIN.COM'))
MONMSG MSGID(CPF9082)
GOTO CMDLBL(TRY1AGN)
END: ENDPGM
If you replace the adddire with a dspdire user(&upuprf) and monitor for
CPF9006, you could probably find the list of users not enrolled.
Mike Krebs
As an Amazon Associate we earn from qualifying purchases.