Is there a way to FTP a command to an AS/400 to copy user

35 pts.
Tags:
AS/400
AS/400 commands
FTP
USRPRF
We are trying to automate and make the setting up of users easier. Is there a way to ftp a command to a as400 to copy user "a" user profile to "b"?

Software/Hardware used:
AS400

Answer Wiki

Thanks. We'll let you know when a new response is added.

So you want to automatically create a new user profile on the AS400.
Some other system is going to sent it a USER PROFILE NAME to use for the create?
Is that it?
*
Is the source system an AS400?
If not, do you have standard default values for all the parms on a CRTUSRPRF command.?
*
It looks like the objective is to call a program on the AS400 that will do what you want.
Correct?

Discuss This Question: 12  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
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
  • CharlieBrowne
    The answer is YES But, I'm not fully understanding what you want to do. Is the AS400 the Source, Target, or Both for the FTP process? What do you mean when you say you want to "ftp a command"? A command someone else needs to run?
    41,370 pointsBadges:
    report
  • Kmsysprog
    We are wanting to ftp a command to the AS400 that would have the name of the copy from user profile and tell it to copy the user profile to a new user.
    35 pointsBadges:
    report
  • Kmsysprog
    yes, We are planning on submitting a ftp from a mainframe passing the parm of the user profile to copy from and want it to create a new one that is like the one it copied from... Is there a copy from one userprofile to another user profile command?
    35 pointsBadges:
    report
  • CharlieBrowne
    First, you need to create a program that will the parameter of USRPRF. Then that program does a CRTUSRPRF. You can hard code the values that you need or table drive them or retrieve the values from a different USRPRF and use those. * Once you have that program, then it is just a matter of how it will be called. You can do any of the following: 1. Submit a command that will call the program 2. Using FTP write the USRPRF to a file on the AS400. (IFS or DB), then have a scheduled program with runs exery x period of time. This program would read the file and to see if any new records were wtitten. If so, it calls the program to create the USRPRF then deletes that record and goes till EOF.
    41,370 pointsBadges:
    report
  • CharlieBrowne
    Remember, whatever you are doing on the AS400 must be done with a USRPRR that has the authority to create new USRPRFs.
    41,370 pointsBadges:
    report
  • TomLiotta
    As noted, the answer is "Yes." But it generally requires writing a program to do it on the target system and sending the CALL command through FTP. (Or wrapping the program in a *CMD on the target and sending that command.) However, it's probably not a good idea. FTP is intended for file transfers even though it supports remote commands. You'd be far better off using facilities that are intended for remote command handling. Further, the general process of "copying" a user profile possibly shouldn't be encouraged. Some procedure based on group profiles could be an example of a better way to go. Create a (group) profile that has all needed authorities or attributes, have it be the group for user "a". Then when a 'copy' is needed, create user "b" with the same group assigned. That's not intended to be complete, but it covers the fundamental principle and it's easier than 'copying' a user profile. What all needs to be "copied"? Tom
    125,585 pointsBadges:
    report
  • NullFields
    It could be as simple as executing the command (without the quotes) "quote rcmd CPYUSRPRF FROMUSRPRF(A) TOUSRPRF(B) TEXT('text for new profile') " from the FTP prompt after you have connected to the remote system. You will need the proper authority to the command and the from user profile.
    880 pointsBadges:
    report
  • HMSSL2K
    3,175 pointsBadges:
    report
  • TomLiotta
    It could be as simple as... The CPYUSRPRF command is a possibility, though most sites haven't purchased those tools. (It's a TAA Tools command.) Still, it's worth a try. Tom
    125,585 pointsBadges:
    report
  • PGMBOB
    Hi, DSPUSRPRF has an output file option. That file can be FTP. A procedure can read the file and CRTUSRPRF on the remote. The password will not be sent. The password will need to be sent along. To maintain the password suggest SAVOBJ *USRPRF to a save file, FTP the *SAVF and restore the *USRPRF. good luck!
    970 pointsBadges:
    report
  • TomLiotta
    DSPUSRPRF has an output file option. and ...SAVOBJ *USRPRF to a save file, FTP the *SAVF and restore the *USRPRF. That might be a little tricky since they "...are planning on submitting a ftp from a mainframe". Tom
    125,585 pointsBadges:
    report
  • Kmsysprog
    [...] 7. There’s a great discussion happening amongst some members helping Kmsysprog FTP a command to an AS/400 to copy a user. [...]
    0 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
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

Thanks! We'll email you when relevant content is added and updated.

Following