Use the CP() function to issue a VM CP command and return a CP's response. z/OS must be operating under VM.
The CP() function has this syntax:
result = CP(command,[stem.])
The CP() function takes these arguments:
|
result |
Error or completion status. |
|
command |
Command string to be passed to CP. Note: VM systems are case-sensitive. |
|
stem. |
Name of a stem variable in which individual lines of CP's response are returned. Include the period. The first line of the response returns in stem.1, the second line in stem.2, and so forth without breaks. The stem variable cannot be global (that is, it cannot begin with an ampersand). Default: Results are returned on the stack and can be accessed with PULL() or a similar function. |
The CP() function produces these return codes:
|
0 |
COMMAND EXECUTED |
|
101 |
ARG 1 MISSING OR INVALID |
|
102 |
One of the following: ARG 2 MISSING OR INVALID ARG 2 NOT STEM VARIABLE |
|
120 |
NOT UNDER VM |
|
121 |
RESPONSE TOO LONG |
|
122 |
PASSWORD REQUIRED |
|
123 |
NO RESPONSE FROM VM |
|
124 |
INSUFFICIENT STORAGE |
Example
cp('MSG RBROWNE testing') == 0 /* RBROWNE would get a message */
cp('Q MVSB1') == 0 /* 'MVSB1 - DSC' might be put in queue */
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |