I have written a CLP to create a standard for creating new user profiles on the iSeries.
I am pulling key parameters from a data file and passing them as parameters rather than hard code the values.
When I run:
DCL VAR(&INLPGML) TYPE(*CHAR) LEN(10)
DCL VAR(&INLPGMP) TYPE(*CHAR) LEN(10)
CRTUSRPRF USRPRF(&VDUSER) PASSWORD (&TMPPSWD) PWDEXP(&PWDEXP)
STATUS(&STATUS) USRCLS(&USRCLS) INLPGM((&INLPGML *TCAT '/' *TCAT INLPGMP))
I get message CPD0078 Value 'JDFOBJA73/' for parameter INLPGM not a valid name.
I first tried using one 20 position parm. That did not work either. All of the other parms get passed fine.
The INLPGM parameter in the command CRTUSRPRF isn't a "LIST" of items; it is a qualified object name. When you use double parentheses ((some value)) this indicates a "LIST" of items. For example, the SNDNETMSG command uses a list for the TOUSRID parameter:
SNDNETMSG MSG('Send this message to many users...') + TOUSRID((USER1 SYSTEM1) + (USER2 SYSTEM1) + (USER33 SYSTEM8) + (USER98 SYSTEM66))
The correct syntax for the INLPGM parameter of the CRTUSRPRF command would use single parentheses:
INLPGM(&INLPGML *TCAT '/' *TCAT INLPGMP)
I hope this helps... Good Luck!
PS - Have you considered creating a "model" user profile with all your defaults and then using RTVUSRPRF in your CLP to retrieve them from this model for use in the CRTUSRPRF command?
MORE INFORMATION ON THIS TOPIC
The Best Web Links: tips, tutorials and more.
Ask your OS/400 questions -- or help out your peers by answering them -- in our live OS/400 discussion forums.
Ask the Experts yourself: Our OS/400 gurus are waiting to answer your questions.
Check out this Search400.com Featured Topic: 20 ways to ensure a smooth OS upgrade
Dig Deeper on Upgrading
Related Q&A from Ken Graap
Find out if log files can be omitted during a save without causing problems in a full restore. Continue Reading
The BRMS Network feature allows a BRMS system to connect to other BRMS systems via a network, and enables a user to consolidate media such as backup ... Continue Reading
The only option to correct damage preventing file journaling is to use the RCLSTG command. Continue Reading