executing a url from the as400

45 pts.
AS/400 errors
AS/400 jobs
I have created a job in the AS400 job schedule and I need to execute a url from that job after I FTP a file to a server. I want to execute the url from the AS400 directly, not from a PC or a 5250 emulator session on a PC. When I run the job, I get a error message Command STRPCO not allowed in this setting. I assume that is because I am trying to run the PC command not from a PC. Does anyone know how to execute the url directly from the AS400? Any help is greatly appreciated.

Answer Wiki

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

Exactly what what do you mean by “executing a URL”?

STRPCO is the Start PC Organizer – I believe it is a holdover from PC Support. It allows you to execute a command on the PC Client. So yeah, it’s not going to work as a batch command on the AS/400…

When you enter a URL into a web browser, the browser makes a request to a web server to send a web page back to the browser. That URL could contain parameters to specify certain things. The combination of URL and parameters could cause the server to do something that doesn’t result in any output being sent to the browser – but that is a bit counter-productive..

Since the AS/400 is not a web browser I’m not sure how you could use it to contact a web server via a URL..

You did say that you were sending a file via FTP and then trying to “execute a URL”. Are you trying to do something on the FTP server? Could you execute a remote command on the FTP server and have that do whatever it is you are trying to do? You already have the FTP connection open to PUT the file..


Discuss This Question: 3  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.
  • Breinhart
    Thanks Mike, What I am trying to do is: I am FTP to a web server to dump a data file to update product availability on our web site for people to purchase. I am dumping this file for update every fifteen minutes. Once I have the file dumped, I am wanting to invoke the URL to update the web server database with the file I just sent. I can call the AS400 CL from my desktop which allows the STRPCO command to work, but when I try to run the CL in a batch job, it does not work. I understand that is because I am not using a PC to invoke the job with an AS400 5250 emulator session. I thought about invoking the URL once i was on the server within the FTP script, but I'm not sure how to code that in the FTP script. Any ideas? Thanks, Bob
    45 pointsBadges:
  • mcl
    If I'm understanding you, the URL you invoke will run some process that updates your database from the file you just uploaded. So, one option.. Can you call that process from a command line on the server? There is an FTP command called "QUOTE" which allows you to send a command to the FTP server. Of course, it all depends on permissions, paths, etc - but you might be able to call the process via FTP. Google is your friend for help with that. Another option - When you upload the file, the properties of the file should indicate when it was changed. It might be possible to set up a CRON job on your web server to check that file - and if the file has changed since the last time it was checked then process the file. Regards Mike
    2,740 pointsBadges:
  • Pcatlin
    Bob.. It sounds like what you want to do is similar to a web services type call... Scott Klement did some neat stuff with that a while back... Take a look at this web page: http://www.scottklement.com/httpapi/ You should be able to use this code to have an RPG program attach to the URL on your server, and then receive the return response (just like a browser would) back into a stream file. You can then parse the stream file to review the results of the URL call... Hope this helps Phil C
    200 pointsBadges:

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.

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


Share this item with your network: