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
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