If you prepend your command with 'rundll32 shell32,ShellExec_RunDLL ' that should also solve your problem, and you won't need to escape characters.
Using the command like this is like executing the url from the 'run' dialog box in windows vs a cmd window.
-Mark
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Bryce Martin
Sent: Tuesday, December 13, 2011 8:03 AM
To: RPG programming on the IBM i / System i
Subject: Re: Problem using more than 1 parameter in URL when using STRPCCMD
Figured it out about 2 minutes after I sent this...
The problem was that the MS-DOS system uses the amersand as a special
character that needs to be escaped. To escape it you must use the caret
symbol Shift+6 on US keyboards. You can do this on the green screen, but
you can put it in your RPGLE code and it will compile and work properly.
cmdstring = 'STRPCCMD PCCMD(' + q + 'Start ' +
'http:' + '/' + '/' + 'example.com' +
'?parm1=' + foo + '^&parm2=' + %char(bar) + q +')
PAUSE(*NO)';
Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777
Bryce Martin <BMartin@xxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
12/13/2011 10:42 AM
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
Problem using more than 1 parameter in URL when using STRPCCMD
I am using STRPCCMD to launch the user's browser to a particular address.
The address sends along 2 parameters but everything beforer the ampersand
that denotes the second parameter is being dropped. I've googled high and
low and haven't see a reference to or explanation of this issue. Anyone
have any ideas???
An example would be...
http://www.example.com?parm1=foo&parm2=bar
Everything after foo is being dropped and not passed to the browser.
Yes the command is short enough, so its not that.
Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777
--- This message (including any attachments) is intended only for the use
of the individual or entity to which it is addressed and may contain
information that is non-public, proprietary, privileged, confidential, and
exempt from disclosure under applicable law. If you are not the intended
recipient, you are hereby notified that any use, dissemination,
distribution, or copying of this communication is strictly prohibited. If
you have received this communication in error, please notify us and
destroy this message immediately. ---
As an Amazon Associate we earn from qualifying purchases.