IBM Support

CL Example Using the STRPCCMD Command

Troubleshooting


Problem

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:

 PGM
       DCL        VAR(&URL) TYPE(*CHAR) LEN(123) +
                    VALUE('"HTTP:\\WWW.IBM.COM"')
       DCL        VAR(&STRCMD) TYPE(*CHAR) LEN(123)
       STRPCO     PCTA(*NO)
       MONMSG     MSGID(IWS4010)

       CHGVAR    VAR(&STRCMD) VALUE('START IEXPLORE.EXE' |> &URL)
       DMPCLPGM
       STRPCCMD   PCCMD(&STRCMD) PAUSE(*NO)
 ENDPGM:     ENDPGM

If you compile and run this program, it should bring up a browser session and go to the URL you specify.

[{"Product":{"code":"SWG60","label":"IBM i"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Component":"Programming (Languages- compilers- tools)","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.1.0;6.1.0;5.4.5;5.4.0;5.3.5;5.3.0;5.2.0;5.1.0","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}},{"Product":{"code":"SSC52E","label":"IBM i 7.1"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Component":" ","Platform":[{"code":"","label":null}],"Version":"","Edition":"","Line of Business":{"code":"","label":""}},{"Product":{"code":"SSC3X7","label":"IBM i 6.1"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Component":" ","Platform":[{"code":"","label":null}],"Version":"","Edition":"","Line of Business":{"code":"","label":""}}]

Historical Number

459625238

Document Information

Modified date:
11 November 2019

UID

nas8N1014202