code

Name
Astradyne (UK) Ltd
Scriptlanguage
Plain Text
Tabwidth
4
Date
Sun, 12 May 2013 14:40:36 +0000
IP
192.168.0.1

Following a thread on the Midrange.Com website the following command and CL program provides the ability to launch a website in a browser from the AS/400, iSeries or System i. The command can also be run from RPG by placing a call to an execution routine such as QCMDEXEC, QCAPCMD, System(), etc.

  1. Command Source
  2. ==============
  3.  
  4. CMD        PROMPT('Launch Browser')
  5.  
  6. PARM      KWD(URL) TYPE(*CHAR) LEN(90) MIN(1) +
  7.           EXPR(*YES) PROMPT('URL to launch')
  8.  
  9.  
  10. Command Processing Program
  11. ==========================
  12. PGM  PARM(&URL)
  13.  
  14.     DCL VAR(&CMD) TYPE(*CHAR) LEN(123)
  15.     DCL VAR(&URL) TYPE(*CHAR) LEN(90)
  16.  
  17.     STRPCO PCTA(*NO)
  18.     MONMSG IWS4010
  19.  
  20.     CHGVAR VAR(&CMD) +
  21.     VALUE('rundll32 url,FileProtocolHandler ' *BCAT &URL)
  22.  
  23.     STRPCCMD PCCMD(&CMD) PAUSE(*NO)
  24.  
  25. ENDPGM
  26.