View previous topic :: View next topic
|
Author |
Message |
Gurumanoj Gurusamy
New User
Joined: 11 Nov 2010 Posts: 22 Location: Mumbai
|
|
|
|
Hi All,
Need to execute a HTTP link using rexx in Z/OS to get the response back.
The HTTP is actually defined to access the result of XSQL. At present this connection has been established through CICS where the query rest will be available in xml format.
Can you please let me know whether from able to execute HTTP and get the response? |
|
Back to top |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
I did something similar using the OMVS (Mainframe Linux) connection. There is a great little program called 'curl' that will do what you need. It wasn't installed when I first found out about it, but even my grumpy guardian of the system installed it without grousing, so it must be fairly safe.
It lives here in OMVS:
/usr/lpp/ported/bin/curl
Find out if you have that, then I can share how I invoke it from a batch job. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hello,
Do you have access to SAS?
If you have SAS then it is easy by defining the URL to a FILENAME statement. Once the URL is defined as a filename you could read it like a flat file.
support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000223242.htm
I once wrote a mainframe application that sent location names to Yahoo Geocoding API, the API URL returned latitude & logitude data of that location to mainframe, which was used to plot the sales of that particular location on Google maps KML language.
Basically generating google maps & google earth data from mainframe, fun stuff :-) |
|
Back to top |
|
|
Gurumanoj Gurusamy
New User
Joined: 11 Nov 2010 Posts: 22 Location: Mumbai
|
|
|
|
Hello vasanthz,
I believe SAS is available in our Z/OS. Could you please help me how I can acchive it? As I dont know much about it your information will be helpful.
Thanks
Guru |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
The third example there has a sample program of how to do it.
Example 3: Reading the First 15 Records from a URL File
This example reads the first 15 records from a URL file and writes them to the SAS log with a PUT statement:
filename foo url
'http://support.sas.com/techsup/service_intro.html';
data _null_;
infile foo length=len;
input record $varying200. len;
put record $varying200. len;
if _n_=15 then stop;
run; |
|
Back to top |
|
|
Gurumanoj Gurusamy
New User
Joined: 11 Nov 2010 Posts: 22 Location: Mumbai
|
|
|
|
SAS didn't help me well, Is there any other possibility through which I can execute http |
|
Back to top |
|
|
|