I have a problem concerning user profiles:
When I retreive a user profile via RTVUSRPRF then I get long strings
for SPCAUT, SETJOBATR, SUPGRPPRF and USROPT. These are not accepted as
valid values for the CRTUSRPRF command.
Any idea how to do it in CL, do I have to split these long strings
returned from RTVUSRPRF into multiple small ones to use them with
CRTUSRPRF?
Gereon
Sent via Deja.com http://www.deja.com/
Before you buy.
You can format the CRTUSRPRF command into a string field and use QCMDEXC API to
get it executed.
Alessandro Monari
SMS Italia
"OKKIO" alle risposte...
to reply strip "OKKIO"
This still doesn't work! Example:
If one user has SUPGRPPRF containing AS400USER1 and AS400USER2 the
field SUPGRPPRF from RTVUSRPRF shows up like
'AS400USER1AS400USER2'
as user profile names can be up to 10 characters long. A 'CRTUSRPRF
SUPGRPPRF(''AS400USER1AS400USER2'')' thus won't work.
Any other idea?
Ops! I'm sorry.
I think that within CL the only way is using &SST built-in function 15 times
separating items with *BCAT. Then using QCMDEXC will work.
DCL VAR(&CMD) TYPE(*CHAR) LEN(512)
DCL VAR(&CMDLEN) TYPE(*DEC) LEN(5)
DCL VAR(&UPUPRF) TYPE(*CHAR) LEN(10) VALUE(AUSRPRF)
DCL VAR(&UPSUPG) TYPE(*CHAR) LEN(165) +
VALUE('BUSRPRF CUSRPRF DUSRPRF')
CHGVAR VAR(&CMD) VALUE(CRTUSRPRF)
CHGVAR VAR(&CMD) VALUE(&CMD *BCAT 'usrprf(' *CAT +
&UPUPRF *TCAT ')')
/* where &UPSUPG contains multiple supplemental groups separated +
by spaces */
CHGVAR VAR(&CMD) VALUE(&CMD *BCAT 'supgrpprf(' *CAT +
&UPSUPG *TCAT ')')
CHGVAR VAR(&CMDLEN) VALUE(196)
CALL QCMDEXC (&CMD &CMDLEN)
This is just some sample code to demonstrate how you might get a list of
values into a command.
Tom Liotta
In article <8kkgkk$cmn$1...@nnrp1.deja.com>,
--
Tom Liotta
AS/400 systems programmer