Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Execute Http from Z/OS through rexx

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Execute Http from Z/OS through rexx
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    Post subject:
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: 1461
Location: Azeroth

PostPosted: Mon Nov 17, 2014 8:24 pm    Post subject:
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.

http://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    Post subject:
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: 1461
Location: Azeroth

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

Hello,

You could find the allocation technique here,
http://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: 1461
Location: Azeroth

PostPosted: Mon Nov 17, 2014 8:49 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts REXX compiled via RXTCOMP sergeyken CLIST & REXX 7 Tue Feb 07, 2017 9:41 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us