Midrange News for the IBM i Community


Posted by: Senthil Appaswamy
how to call the URL inside rpg or CL...
has no ratings.
Published: 18 Apr 2012
Revised: 23 Jan 2013 - 1613 days ago
Last viewed on: 23 Jun 2017 (6547 views) 

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.

how to call the URL inside rpg or CL... Published by: Senthil Appaswamy on 18 Apr 2012 view comments(5)

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

Return to midrangenews.com home page.
Sort Ascend | Descend

COMMENTS

(Sign in to Post a Comment)
Posted by: neilrh
Premium member *
Jackson, MI
Comment on: how to call the URL inside rpg or CL...
Posted: 5 years 2 months 6 days 18 hours 49 minutes ago

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?

Posted by: clbirk
Premium member *
Comment on: how to call the URL inside rpg or CL...
Posted: 5 years 2 months 6 days 14 hours 4 minutes ago

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).

Posted by: TFisher
Premium member *
Comment on: how to call the URL inside rpg or CL...
Posted: 5 years 2 months 6 days 12 hours 45 minutes ago

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.

Posted by: ask2179
Premium member *
Comment on: how to call the URL inside rpg or CL...
Posted: 5 years 2 months 5 days 16 hours 38 minutes ago

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

Posted by: davemonste
Premium member *
Chicago, IL
Comment on: how to call the URL inside rpg or CL...
Posted: 5 years 1 months 27 days 14 hours 53 minutes ago

Scott Klement HTTPAPI is very good too

 

http://www.scottklement.com/httpapi/