calling a URL from RPG OR CL
5 pts.
0
Q:
calling a URL from RPG OR CL
I would like to call a html. page from either a RPGLE or CL program.

Software/Hardware used:
AS400
ASKED: Nov 2 2009  5:42 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
3250 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
Check out this article:

http://systeminetwork.com/article/use-cgi-redirects-launch-long-urls.

It requires a membership but i think a free on will work. If not you can get the code from:

http://www.pentontech.com/IBMContent/Documents/article/55778_385_OpenUrl.zip
Last Answered: Nov 2 2009  9:17 PM GMT by Teandy   3250 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

TomLiotta   7990 pts.  |   Nov 5 2009  2:05AM GMT

There are at least two possible meanings from your question:

  1. Most likely — you want a user who calls your program in a telnet emulator session to see a browser open up on his/her PC with a web page that was provided by your program.
  2. Less likely — you want your RPG (or CL) program to connect some web server and read a page from that server. Processing of the HTML would be done in your program.

The most common way to handle the first case is with the STRPCCMD command. Set the environment by running a STRPCO command. Then:

STRPCCMD PCCMD(’start <a href="http://www.google.com'" title="http://www.google.com'" target="_blank">http://www.google.com\’</a>) PAUSE(*NO)

There are some significant limitations and restrictions with STRPCCMD. Be prepared to throw it away and replace it with RUNRMTCMD.

You can get experience with STRPCCMD, but it might not work with your emulator software or you might not like its security implications or you might simply exceed its limits. When/if that happens, you should already be prepared to use RUNRMTCMD (or an alternative such as rexec() or others).

Tom

 

TomLiotta   7990 pts.  |   Nov 5 2009  2:10AM GMT

Ah… this blasted editor messed the URL in that STRPCCMD parameter. If you just put the plain google URL in place of [googleurl] in this:

STRPCCMD PCCMD(’start [googleurl]‘) PAUSE(*NO)

…you should get the idea.

Tom

 
0