Hi Pat,
This is what I have been using for a few years now here. I have a command
wrapped around this that prompts for the web site. It could also be used
without the command and you just pass in a parm for the website.
PGM PARM(&SITE)
DCL VAR(&CMD) TYPE(*CHAR) LEN(120)
DCL VAR(&SITE) TYPE(*CHAR) LEN(30)
CHGVAR VAR(&CMD) VALUE('rundll32.exe +
url.dll,FileProtocolHandler ' *BCAT +
'
http://www.' *CAT &SITE *TCAT '.com')
STRPCO PCTA(*NO)
MONMSG MSGID(IWS4010)
STRPCCMD PCCMD(&CMD) PAUSE(*NO)
ENDPGM
Thanx,
Nick
Nick Radich
Sr. Programmer/Analyst
EPC Molding, Inc.
Direct (320) 679-6683
Toll free (800) 388-2155 ext. 6683
Fax (320) 679-4516
nick_radich@xxxxxxxxxxxxxx
"Pat Landrum" <PLandrum@xxxxxxxxxxxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
04/02/2010 03:12 PM
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>
To
"RPG programming on the IBM i / System i" <rpg400-l@xxxxxxxxxxxx>
cc
Subject
RE: Press enter to activate a link (DLee@xxxxxxxx)
Hello,
If you want the user to use their default web browser, use the following
as the initial value of &IE:
rundll32 url,FileProtocolHandler
To this you would append the web link. For instance, if I wanted our
user to hit our main web site, the entire command would be:
rundll32 url,FileProtocolHandler
http://hcps.us
On the STRPCCMD you might want to include the option PAUSE(*NO).
Regards,
Pat Landrum
Senior Programmer/Analyst
Hanover County Public Schools
200 Berkley Street
Ashland, Va 23005
Phone: 804-365-4658 Email: plandrum@xxxxxxx
Notice: This message or any accompanying documents may contain
confidential or privileged information of Hanover County Public Schools.
If you are not the intended recipient, disclosure, copying or
distribution is strictly prohibited by state and federal law. If you
received this message in error, please notify the sender as soon as
possible.
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of DLee@xxxxxxxx
Sent: Friday, April 02, 2010 2:43 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Press enter to activate a link (DLee@xxxxxxxx)
Booth
Thanks for your replay, but the below suggestion didn't work for me.
Below is what I ended up doing: I modified the original program that
generates the web link, and passed it to this program, which actually
brought up the web page as expected.
This works in case anyone would find it usefull. With some tinkering, a
person could probably make this a nice service program.
PGM &WEBLNK
DCL VAR(&WEBLNK) TYPE(*CHAR) LEN(70)
DCL VAR(&SEL) TYPE(*CHAR) LEN(200)
Dcl &Quote *Char ( 1 ) Value( '"' )
DCL VAR(&SEL) TYPE(*CHAR) LEN(200)
// declare the path to internet explores
DCL VAR(&IE) TYPE(*CHAR) LEN(51) +
VALUE('"C:\Program Files\Internet +
Explorer\IEXPLORE.EXE" "') // Add quotes to
the end of the target web link
CHGVAR VAR(%SST(&WEBLNK 65 1)) VALUE("E)
// concat the path to internet explorer to the target web page
CHGVAR VAR(&SEL) VALUE(&IE || &WEBLNK)
STRPCO
MONMSG MSGID(CPF0000 IWS4010)
STRPCCMD PCCMD(&SEL)
RCLRSC
RETURN
ENDPGM
<See if something like this might work for you:
< In your DSPF
< RTNCSRLOC(&REC &FLD)
< REC 10A H
< FLD 10A H
< In your RPG:
< select;
< when FLD = 'WSABA#'; // Enter pressed in this field < exsr
CreateWeb; < endsl;
Regards,
SWBC
9311 San Pedro Ave., Suite 600
San Antonio, TX 78216
Visit our website at www.swbc.com
As an Amazon Associate we earn from qualifying purchases.