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: 1445
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: 1445
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: 1445
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 What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm


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