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?
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.
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?
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.
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
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.
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
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!
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
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!
Discuss This Question: 12  Replies