Q
Problem solve Get help with specific problems with your technologies, process and projects.

Creating new user profiles on the iSeries

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


This was last published in September 2004

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchDataCenter

Close