Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieve USERID in CL Program

Status
Not open for further replies.

finadar

IS-IT--Management
Mar 29, 2010
1
US
Not sure if this can be done in a CL program or not. I have no trouble passing the variables to a RPG program. What I am trying to do is Retrieve the UserID from the AS/400 of the user running the job. I then try to compare the UserID in the CL to a list of Names. Depending on the name the CL will execute the proper OVRPRTF. Here is a snip of what I have done.

DCL VAR(&USERID) TYPE(*CHAR) LEN(10) /* User */

RTVJOBA JOB(&MSGQ) USER(&USERID) DATE(&DATE)

IF (&USERID *EQ 'USER1') THEN(OVRPRTF +
FILE(REPORT2) PAGESIZE(&LINES &WIDTH) +
LPI(&LPI) CPI(&CPI) OVRFLW(&OVRFLW) +
PRTTXT(&PRTTXT) OUTQ(@OUTQLIB/P4V) +
FORMTYPE(&FORMS) COPIES(1) HOLD(&HOLD) +
USRDTA(&USRDTA))

Is this possible?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top