PMS Information Systems
Welcome to PMS Information Systems - IBM i (AS/400) Forum !!!

Get Answers for all your queries on IBM i (AS/400).

Is user profile name same as password?

View previous topic View next topic Go down

Is user profile name same as password?

Post  maran on Mon May 13, 2013 7:23 pm

PGM
DCL VAR(&USRPRF) TYPE(*CHAR) LEN(10)
DCL VAR(&HANDLE) TYPE(*CHAR) LEN(12)
DCLF FILE(QSYS/QADSPOBJ)
DCL VAR(&APIERR) TYPE(*CHAR) LEN(284)
DCL VAR(&HEX00) TYPE(*CHAR) LEN(1) VALUE(X'00')
DCL VAR(&MSGID) TYPE(*CHAR) LEN(7)
DCL VAR(&MSG) TYPE(*CHAR) LEN(256)
DCL VAR(&MSGDTA) TYPE(*CHAR) LEN(256)
DCL VAR(&MSGF) TYPE(*CHAR) LEN(10)
DCL VAR(&MSGL) TYPE(*CHAR) LEN(10)
MONMSG MSGID(CPF0000) EXEC(GOTO CMDLBL(ERROR))
DSPOBJD OBJ(QSYS/*ALL) OBJTYPE(*USRPRF) OUTPUT(*OUTFILE) OUTFILE(QTEMP/QADSPOBJ)
OVRDBF FILE(QADSPOBJ) TOFILE(QTEMP/QADSPOBJ)
REREAD:RCVF MONMSG MSGID(CPF0864) EXEC(DO)
RCVMSG MSGTYPE(*EXCP)
RETURN
ENDDO
CHGVAR VAR(&APIERR)
VALUE(' ')
CHGVAR VAR(%SST(&APIERR 1 Cool) + VALUE(X'0000011000000000')
CHGVAR VAR(&USRPRF) VALUE(&ODOBNM)
CALL PGM(QSYGETPH) PARM(&USRPRF &USRPRF &HANDLE +
&APIERR)
IF COND(%SST(&APIERR 8 1) = &HEX00) THEN(DO)
SNDPGMMSG MSGID(CPF9898) MSGF(QCPFMSG) MSGDTA('PROFILE +
NAME AND PASSWORD MATCH FOR USER: ' !! +
&USRPRF)
CHGVAR VAR(&APIERR) VALUE(' ')
CHGVAR VAR(%SST(&APIERR 1 Cool) +
VALUE(X'0000011000000000')
/* CALL PGM(QSYRLSPH) PARM(&HANDLE &APIERR) */
ENDDO GOTO CMDLBL(REREAD)
ERROR:
MSGD: RCVMSG MSGTYPE(*DIAG) MSG(&MSG) MSGDTA(&MSGDTA) +
MSGID(&MSGID) MSGF(&MSGF) MSGFLIB(&MSGL)
IF COND(&MSGID *NE ' ') THEN(DO)
SNDPGMMSG MSGID(&MSGID) MSGF(&MSGL/&MSGF) +
MSGDTA(&MSGDTA) MSGTYPE(*DIAG)
GOTO CMDLBL(MSGD)
ENDDO
MSGE: RCVMSG MSGTYPE(*EXCP) MSG(&MSG) MSGDTA(&MSGDTA) +
MSGID(&MSGID) MSGF(&MSGF) MSGFLIB(&MSGL)
IF COND(&MSGID *NE ' ') THEN(SNDPGMMSG +
MSGID(&MSGID) MSGF(&MSGL/&MSGF) +
MSGDTA(&MSGDTA) MSGTYPE(*ESCAPE))
ENDPGM

maran
Admin

Posts : 442
Join date : 2009-07-24

View user profile http://pmsinformationsystem.forumotion.net

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum