Lenny2113
115 pts. | Aug 13 2009 7:33PM GMT
Michael, I appeciate your feedback on this one.
Please let me know what I am doing wrong here.
My field that expects userid input is called UserName.
We want to make it default to the current user instead of allowing users to type whatever they want..
I have included this code as part of my CGI program under process ( C $ProcInput Begsr )
C Eval EnVarName = ‘REMOTE_USER’
C Eval EnVarLen = %Len(%Trim(EnVarName))
C CallP APIEnVar(InBuffer:InBufLen:InActLen:
C EnVarName:EnVarLen:apiError)
Can I now set my UserName field to EnVarName ?
I tried this code :
D UserID 358 367
and assigned UserID to UserName, but instead of real user id I displayed the name of server instance QTMHHTTP1
These are my jobs related to the process…. (Current User = “QTMHHTTP”)
Current
Subsystem/Job User Type CPU % Function Status
QHTTPSVR QSYS SBS .0 DEQW
ADMIN QTMHHTTP BCH .0 PGM-QZHBMAIN SIGW
ADMIN QTMHHTTP BCI .0 PGM-QZSRLOG SIGW
ADMIN QTMHHTTP BCH .0 PGM-QLWISVR JVAW
ADMIN QTMHHTTP BCI .0 PGM-QZSRHTTP SIGW
ADMIN LENNY BCI .0 PGM-QZSRCGI TIMW
ADMIN2 QLWISVR BCI .0 JVM-com.ibm.lw THDW
IBMTEST QTMHHTTP BCH .0 PGM-QZHBMAIN SIGW
IBMTEST QTMHHTTP BCI .0 PGM-QZSRLOG SIGW
IBMTEST QTMHHTTP BCI .0 PGM-QZSRLOG SIGW
IBMTEST QTMHHTTP BCI .0 PGM-QZSRHTTP SIGW
IBMTEST QTMHHTTP BCI .0 PGM-QZSRHTTP DEQW
IBMTEST QTMHHTP1 BCI .0 PGM-QZSRCGI TIMW
Littlepd
500 pts. | Aug 14 2009 3:51AM GMT
Has the user already logged in at this point?
After you call the API, the user id of the current session user can be found in the InBuffer variable.






