Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.
Hi,
how to call the URL inside rpg or CL. Please don;t give the answer using STRPCO and STRPCCMD. if any other option is available, please provide me.
Thanks
Senthil a
What exactly are you trying to acheive? Typically you would open a browser, enter a url and the result of you interacting with the webpage will cause programs on the web server to be run. Much like this site, when you click the "POST Comment" button, an RPG program is called on the server that runs this website. I don't see why an RPG or CL program needs to "Call a URL" - or did you mean post a webpage, as in assemble the html and then display the page in a browser?
I do this all the time with brad stone's GETURI (www.bvstools.com). We use this to upload files to a website db, to do web services, to authorize credit cards, to get answers from the webserver, etc.
Now if your goal is only to pop out a webpage, then take a look at aaron bartell's mowyourlawn.com and look at his rpg 2 desktop that you can end up calling such (that works within a program, not necessarily in a cl situation).
If you are simply trying to open a document on a user's workstation then I don't know why you wouldn't want to use one of the STRPC commands. They work really well for that sort of thing.
If you are trying to go directly to a web site from your iSeries application then you probably want to look into doing an HTTP type request using sockets. I have done that once, but only to the extent of seeing if a URL is valid or not. If this is anything close to what you are wanting to do then you probably need to read up on using sockets and HTTP on the iSeries.
Something else that I remember Bob doing a while back that might help (if it's accessible) is his program that interfaced to Twitter.
Thanks for all replies. Actually i'm using ERP, i need to invoke the URL from GUI application. GUI application will call the RPG/CL, inside i need to call URL with parameter. As Clbirk replied, just i need to invoke the URL directly from RPG/CL. If i used HTTP on iseries also going to give the URL .
Thanks
Senthil A