2

On the AS400 I want to remotely execute:

strpgrprg topgr(userx) message(ALERT!)

What options are available to me?

update: I want to run a AS400 program from outside of the AS400. I want to execute this command (or similar) from a windows batch, or a linux shell script.

I've found some info on how-to via FTP. Just haven't tried it out and still looking to see if it's the best way to do it.

  • Can you provide more details? You want to execute a command on the i or on a PC? What would be executing this command? – Mike Wills Jun 17 '11 at 18:34
  • updated. Linked something I found that uses FTP. Haven't had a chance to try it out, but still would like to know other options. – WernerCD Jun 17 '11 at 18:52
  • 1
    You may get a more knowledgeable audience on Serverfault. – music2myear Jun 17 '11 at 18:53
  • What @music2myear said. An AS400 may be a little out of scope for Super User's standard audience, I'm afraid. – Shinrai Jun 17 '11 at 19:39
2

Unless you want to write a simple Java program using JT400, FTP is probably your best option.

If you want other options, post a message on MIDRANGE-L there are around 2,000 people on the list many whom have done this before.

| improve this answer | |
  • FTP is easy... now I just gotta merge this with my next question about Exchange Email Account monitoring & Scripting. Thanks. – WernerCD Jun 21 '11 at 14:16
1

IBM i has a rexec service that you could try using.

To start it, run 'STRTCPSVR SERVER(*REXEC)'

I've never used it myself, but it should work with any rexec client.

| improve this answer | |
0

I believe you can use the SBMRMTCMD as well, the only drawbacks would be

  1. if the command can only be run in certain modes

  2. you cannot prompt the command, as it is passed like a string.

You should do that off the QCMD command line, get the parms that you want, then copy and paste.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.