Opening an internet browser session from AS/400 5250 session.

pts.
Tags:
AS/400
Development
RPG
Web
Web development
In my CL program on the AS/400, I have a URL that references a document stored on a network server that I would like to display to the user in an internet browser session while they are using a 5250 session on the As400. (i know it's a run-on sentence.) Can someone give me advice as to the best(cheapest) way to accomplish this. The users will have MS Internet Explorer. Thanks.

Answer Wiki

Thanks. We'll let you know when a new response is added.

If your user has Client Access, put the following lines in the CL to start IE:

STRPCO
MONMSG MSGID(IWS4010)

STRPCCMD PCCMD(‘C:PROGRA~1INTERN~1iexplore.exe +
HTTP://www.google.com’)

Note that the command cannot handle long path names. Replace the sample URL with yours. You can use this cl command to run any pc command.

Discuss This Question: 11  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Davisty
    THis can also be done in CA using >Assist>HotSpot setup>URL and clicking on "Execute URL" If you have a a url on your screen, the default browser will load that url.
    0 pointsBadges:
    report
  • BikerDude
    OK, here's what I used. StrPco MonMsg Msgid(IWS4010) ChgVar &PcCmd ('C:PROGRA~/INTERN~/iexplore.exe' *bcat &url) StrPcCmd PcCmd(&PCcmd) Now I'm receiving a CPD0074 error that my command is over 123 characters. And it's true my total command is 133 characters. Does anyone know of a way around this limitation? I can't control the length of the URL i'm using and the directory tree structure is pretty long. I may have to revert to using the second suggestion of displaying it on the screen and telling the user to "click" on it. thanks for any further help
    0 pointsBadges:
    report
  • JPLamontre
    your command is too long ? make a .BAT ! (or a .CMD) ie - write a file in IFS or QDLS conatining your command - run this file from strpccmd. be carefull to name the .BAT file using pc-naming convention : shortcut to the file must be correct. For example: MyAs400MySharingqdlssomewhereMyIeRun.bat stepping : 1) make the .BAT running correctly from the PC 2) integrate the PC Command in you cl
    0 pointsBadges:
    report
  • ITAddict
    You could create a Symbolic Link of your complex directory sturcture into a simpler path if your documents are in the same folder. If your documents are in the folder "company meetings", the command might look like this: ADDLNK OBJ('sharecompanycompany meetings') NEWLNK('meetings') Your PC command would reference the path "meetings".
    875 pointsBadges:
    report
  • Pasricha293762
    Hello Dear, Thanks for your kind support here. I have tried to run the same code but i am getting error. Code: - PGM STRPCO MONMSG MSGID(IWS4010) STRPCCMD PCCMD('C:PROGRA~1INTERN~1iexplore.exe + HTTP://www.google.com') ENDPGM Error Getting :- 'C:PROGRA~1INTERN~1iexplore.exe' is not recognized as an internal or external command, operable program or batch file. Please help me to sort out this problem
    10 pointsBadges:
    report
  • Bigmac46
    try
    DCL        VAR(&URL) TYPE(*CHAR) LEN(104) 
    DCL        VAR(&STRCMD) TYPE(*CHAR) LEN(123)
    STARTPC:    STRPCO     PCTA(*NO)                                    
                MONMSG     MSGID(IWS4010)                               
                CHGVAR     VAR(&STRCMD) VALUE('start iexplore.exe' |> + 
                             &URL)                                      
                STRPCCMD   PCCMD(&STRCMD) PAUSE(*NO)                    
    
    It works for us.
    1,000 pointsBadges:
    report
  • mcl
    STRPCCMD PCCMD(’C:PROGRA~1INTERN~1iexplore.exe + Missing some backslashes there, I'm thinking. Probably should be STRPCCMD PCCMD(’C:PROGRA~1INTERN~1iexplore.exe + Basically, if you execute the command from a "DOS" command window, it is OK. As far as the length limitations - remember these commands are holdovers from "PC Support" - the predecessor of Client Access. Things were smaller back then. :) Regards Mike
    2,740 pointsBadges:
    report
  • mcl
    Look at that - it stripped the backslashes. Well, there should have been a backslashes. But again, if you can execute the command in a DOS window, it should work. Regards Mike
    2,740 pointsBadges:
    report
  • Nila
    I have CL which opens a URL but how do I use this CL to open when user do a mouse click on DSPF?
    10 pointsBadges:
    report
  • Bigmac46
    This works for me and gives me 100 characters for the url .
    PGM        PARM(&URL)                                     
    DCL        VAR(&URL) TYPE(*CHAR) LEN(100)                 
    DCL        VAR(&STRCMD) TYPE(*CHAR) LEN(123)              
                                                              
    STRPCO     PCTA(*NO)                                      
    MONMSG     MSGID(IWS4010)                                 
    CHGVAR     VAR(&STRCMD) VALUE('start iexplore.exe' |> +   
                 &URL)                                        
    STRPCCMD   PCCMD(&STRCMD) PAUSE(*NO)   
    
    1,000 pointsBadges:
    report
  • Sloopy
    Regarding the use of a mouse - are you using the MOUBTN DDS keyword? In which case, your program will take control, and must check where the cursor is and call the relevant program. Use the events E00-E15 indicators, unless you want a function key to also do the same thing. Otherwise, if you are thinking of mouse operations handled by Client Access, all that can do is either emulate a function key press (if the cursor is on a number between 1 and 24) or execute a hotspot programmed into that local Client Access setup. There may be other events that can be programmed, but they are all LOCAL to that Client Access installation. If you want something to apply to ALL users, then you either have to set up their Client Access all the same way, or else use the MOUBTN DDS keyword (which is the better way).
    2,195 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: