IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Execute Http from Z/OS through rexx


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Gurumanoj Gurusamy

New User


Joined: 11 Nov 2010
Posts: 22
Location: Mumbai

PostPosted: Mon Nov 17, 2014 7:53 pm
Reply with quote

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
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Mon Nov 17, 2014 8:12 pm
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1693
Location: Tiruppur, India

PostPosted: Mon Nov 17, 2014 8:24 pm
Reply with quote

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
View user's profile Send private message
Gurumanoj Gurusamy

New User


Joined: 11 Nov 2010
Posts: 22
Location: Mumbai

PostPosted: Mon Nov 17, 2014 8:30 pm
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1693
Location: Tiruppur, India

PostPosted: Mon Nov 17, 2014 8:34 pm
Reply with quote

Hello,

You could find the allocation technique here,
support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000223242.htm

something like this
filename foo url 'http://www.a.com/test.dat';
The above statement allocates the url into a logical name as foo.
same as DD name in JCL.

Here foo is the DD name & URL is the filename.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1693
Location: Tiruppur, India

PostPosted: Mon Nov 17, 2014 8:49 pm
Reply with quote

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
View user's profile Send private message
Gurumanoj Gurusamy

New User


Joined: 11 Nov 2010
Posts: 22
Location: Mumbai

PostPosted: Mon Nov 17, 2014 11:38 pm
Reply with quote

SAS didn't help me well, Is there any other possibility through which I can execute http
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Can you give me examples of programs ... CLIST & REXX 9
No new posts ZOS Console commands through USS REXX? CLIST & REXX 5
No new posts REXX table content on panel will be r... CLIST & REXX 6
No new posts http-get/post/... PL/I & Assembler 0
No new posts Tilde Characters Changing to COLONs i... CLIST & REXX 22
Search our Forums:

Back to Top