it's very easy.  below is some code with all error checking taken out.  you can 
find all you need in the Communications Server documentation:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/F1A1D480/3.5

The details about httpd commands (get, post, etc)  you'll have to find yourself.

This will get the "index.html" from a server.

Kind Regards,
Lindy Mayfield

/*  rexx  */                                                        
/*  Make a connection to an http server, read the result and exit.  
*/                                                                  
Host = 'www.ibm.com'                                                
Port = '80'                                                         
                                                                    
srv = Socket('Initialize', 'httpd')                                 
srv= Socket('Socket')                                               
parse var srv src sockid                                            
srv = Socket('Ioctl',sockid,'FIONBIO','OFF' )                       
srv = Socket('Gethostbyname',Host)                                  
parse var srv src hostip                                            
srv = Socket('Setsockopt',sockid,'SOL_SOCKET','SO_REUSEADDR','ON')  
srv = Socket('Setsockopt',sockid,'SOL_SOCKET','SO_LINGER','OFF')    
srv = Socket('Setsockopt',sockid,'SOL_SOCKET','TCP_NODELAY','OFF')  
srv = Socket('Connect',sockid,'AF_INET' Port hostip)                
/*  Communicate in ASCII  */                                        
srv = Socket('Setsockopt',sockid,'SOL_SOCKET','SO_ASCII','ON')      
parse var srv src                                                   
Httpmsg = 'GET /'                                                   
srv = Socket('Send',sockid, Httpmsg "  " '0d25'x )                  
srv = Socket('Recv',sockid)                                         
parse var srv src len data                                          
say data                                                            
exit                                                                

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of 
jagadishan perumal
Sent: Wednesday, July 06, 2011 6:02 PM
To: IBM-MAIN@bama.ua.edu
Subject: Rexx code to reach an IP

Hi Group,

I am trying to reach a URL :http://xxx.41.xxx.x:8080/MF/services  from 
mainframe  Are there any sample Rexx that can be used to reach the above IP 
using TCPIP Socket ?

Regards,
Jags

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at 
http://bama.ua.edu/archives/ibm-main.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to