This document provides a CL example that uses the STRPCCMD command.
Resolving The Problem
Caution: The following code is only an example. IBM accepts no responsibility for its correctness.
If the Start PC Command (STRPCCMD) uses a URL with a special character (like the & sign) or if it is case sensitive, you must put the value of the URL in single quotes and then in a double quote. The IBM System i products requires only the single quote. Because the command is sent to DOS and then DOS sends the command to the browser, the double quote is needed so DOS does not truncate the URL. You will get message CPD0744 if the value is over 123 characters.
Note: This CL program needs to be run in an interactive session, not as a batch job.
The following is a CL example using STRPCCMD:
DCL VAR(&URL) TYPE(*CHAR) LEN(123) +
DCL VAR(&STRCMD) TYPE(*CHAR) LEN(123)
CHGVAR VAR(&STRCMD) VALUE('START IEXPLORE.EXE' |> &URL)
STRPCCMD PCCMD(&STRCMD) PAUSE(*NO)
If you compile and run this program, it should bring up a browser session and go to the URL you specify.
11 November 2019