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:
Error or completion status.
Command string to be passed to CP.
Note: VM systems are case-sensitive.
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:
COMMAND EXECUTED
ARG 1 MISSING OR INVALID
One of the following:
ARG 2 MISSING OR INVALID
ARG 2 NOT STEM VARIABLE
NOT UNDER VM
RESPONSE TOO LONG
PASSWORD REQUIRED
NO RESPONSE FROM VM
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 © 2012 CA. All rights reserved. | Tell Technical Publications how we can improve this information |