Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RPG interfacing with Web Forms

Status
Not open for further replies.

Fooch

Programmer
Dec 19, 2005
63
0
0
US
This is kind of a long shot, but I was thinking outloud and just wanted to see if anyone knew if this was possible or not.

I am automating a process that starts on the iSeries in ILe RPG. After this process starts I need to go to an intranet webpage and fill out a "Request for Services" to the security group to create some libraries in production for me because I do not have the authority.

Is there a way, in RPG or JAVA, from my program, go to that URL(not display it) fill out the form and submit it? Let me know if I'm crazy lol.
 
Try this CL program, which you can call from the RPG program (it works as long as the URL is 117 characters or less):

Code:
             PGM        PARM(&WEBSITE)                             
             DCL        VAR(&CALL) TYPE(*CHAR) LEN(123) VALUE(' ') 
             DCL        VAR(&WEBSITE) TYPE(*CHAR) LEN(117)         
             STRPCO     PCTA(*NO)                                  
             MONMSG     MSGID(IWS4010)                             
             CHGVAR     VAR(&CALL) VALUE('start' *BCAT &WEBSITE)   
             STRPCCMD   PCCMD(&CALL) PAUSE(*NO)                    
             MONMSG     MSGID(CPF0000)                             
             ENDPGM

Da mihi sis crustum Etruscum cum omnibus in eo.

 
What does that do exactly? Looks like it jsut brings up the webpage.
 
From your description, I thought that's what you wanted it to do.

If you want to completely automate the whole thing, it will get really complicated.

Now, if the web page in question takes parameters in the URL (ask the author of the page if you can do that), you might be able to pass the library name, your user ID, and so forth, to the page. But you're still limited to 117 characters.

The "really complicated" part would be to use something like Scott Klement's HTTPAPI routines. I've never used this myself, but it may work for you.

If you decide to use this, sign up for his mailing list (link is at the bottom of the page). Good luck.

Da mihi sis crustum Etruscum cum omnibus in eo.

 
I actually have the Scott Klement LIBHTTP on the iSeries here lol. I was looking through them but it's hard to follow the code. I basically want to fill out a form and hit the submit button without even bringing up a browser.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top