Difference between revisions of "STRPCCMD"

From MidrangeWiki
Jump to: navigation, search
(initial entry)
 
m (formatting and links)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
STRPCCMD is a component of iSeries Access that allows a program running in i5/os to execute a command on the attached PC; that is, the PC associated with the job running on i5/os.
+
{{AN}} is a component of [[iSeries Access]] that allows a program running in i5/os to execute a command on the attached PC; that is, the PC associated with the job running on i5/os.  STRPCCMD is limited to 123 characters.
  
 
Here are some examples of using STRPCCMD in a CL program taken from the Web400-L list:
 
Here are some examples of using STRPCCMD in a CL program taken from the Web400-L list:
  
{{code|CHGVAR &CMD VALUE('START http://xxx.xxx.xxx.xxx/path/path/path?parm1=' *TCAT &PARM1 *TCAT '^&parm2=' *TCAT &PARM2)}}
+
{{code|<pre>CHGVAR &CMD VALUE('START http://xxx.xxx.xxx.xxx/path/path/path?parm1=' *TCAT &PARM1 *TCAT '^&parm2=' *TCAT &PARM2)</pre>}}
<br>
+
{{code|<pre>STRPCCMD PCCMD(&CMD) PAUSE(*NO)</pre>}}
{{code|STRPCCMD PCCMD(&CMD) PAUSE(*NO)}}
 
  
 
The caret before the ampersand in parameter 2 is an escape character.  Without it, {{code|CMD.EXE}} would think you were trying to run two commands.  This will open up the black DOS window momentarily, which may be annoying.  A way to run a PC command without doing that is:
 
The caret before the ampersand in parameter 2 is an escape character.  Without it, {{code|CMD.EXE}} would think you were trying to run two commands.  This will open up the black DOS window momentarily, which may be annoying.  A way to run a PC command without doing that is:
  
{{code|CHGVAR VAR(&CMD) VALUE('rundll32 url,FileProtocolHandler http://xxx.xxx.xxx.xxx/path/path/path?parm1=' *TCAT &PARM1 *TCAT '&parm2=' *TCAT &PARM2)}}
+
{{code|<pre>CHGVAR VAR(&CMD) VALUE('rundll32 url,FileProtocolHandler http://xxx.xxx.xxx.xxx/path/path/path?parm1=' *TCAT &PARM1 *TCAT '&parm2=' *TCAT &PARM2)</pre>}}
<br>
+
{{code|<pre>STRPCCMD PCCMD(&CMD) PAUSE(*NO)</pre>}}
{{code|STRPCCMD PCCMD(&CMD) PAUSE(*NO)}}
+
 
 +
==Categories==
 +
[[Category:Commands]]

Latest revision as of 16:30, 6 November 2014

STRPCCMD is a component of iSeries Access that allows a program running in i5/os to execute a command on the attached PC; that is, the PC associated with the job running on i5/os. STRPCCMD is limited to 123 characters.

Here are some examples of using STRPCCMD in a CL program taken from the Web400-L list:

CHGVAR &CMD VALUE('START http://xxx.xxx.xxx.xxx/path/path/path?parm1=' *TCAT &PARM1 *TCAT '^&parm2=' *TCAT &PARM2)
STRPCCMD PCCMD(&CMD) PAUSE(*NO)

The caret before the ampersand in parameter 2 is an escape character. Without it, CMD.EXE would think you were trying to run two commands. This will open up the black DOS window momentarily, which may be annoying. A way to run a PC command without doing that is:

CHGVAR VAR(&CMD) VALUE('rundll32 url,FileProtocolHandler http://xxx.xxx.xxx.xxx/path/path/path?parm1=' *TCAT &PARM1 *TCAT '&parm2=' *TCAT &PARM2)
STRPCCMD PCCMD(&CMD) PAUSE(*NO)

Categories