Is there a way to issue the PWRDWNSYS command in a program or CL. We need to END MQSeries before issuing the PWRDWNSYS
command and there would be less room for error if we could do both in one program and then just call that program.
You can issue the PWRDWNSYS command in a CL program just like the commands you would issue to end MQSeries. Your problem is probably one of authority. In order for your program to successfully compile, the user who is compiling the object has to have authority to the commands contained in the program. By the same token, the person running the program has to have authority to the command too. To get around these two problems, have a user profile with sufficient authority compile the program and then change the program to run under the creator's user profile. Ex. CHGPGM PGM(MYLIB/MYPGM) USRPRF(*OWNER) Since powering down the system is something that you wouldn't want just anyone to be able to do, you will also want to control who can run this program by revoking all authority to the program and then selectively granting authority to the users who should be authorized to run the program. Another approach would be to selectively grant authority to the PWRDWNSYS and MQSeries commands to the people who would edit, compile and run this program. In my opinion the first approach is more controllable and reduces the chance of error.
MORE INFORMATION ON THIS TOPIC
The Best Web Links: tips, tutorials and more.
Ask your systems management questions--or help out your peers by answering them--in our live discussion forums.
Dig deeper on RPG iSeries programming
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.