CAPTURE
The CAPTURE command provides the means to run and capture the output of a specified TCL command and to append it to, or overwrite, a specified item. For instance, it might append a PRINT-CATALOG output to a report created by SYSINFO.
Syntax
CAPTURE "commandLine" {(O}
TO: {(file-specifier} {item-id}
CAPTURE "commandLine" (T{O}
Enter tape unit desired: unitNumber
TO: {(file-specifier} item-id
CAPTURE "command" (P
CAPTURE (H
Syntax Elements
"commandLine"A complete TCL command line, including any parameters and options. The quotes around the TCL command line are strictly required only if it includes options, to distinguish these from CAPTURE's own options.
unitNumberIdentifies a tape unit (required only with the T option).
(file-specifierSpecifies a file. If a file is not specified, SYSDATA is used; if SYSDATA does not already exist, it is created.
item-id Specifies an item, within the SYSDATA file if file-specifier is omitted, otherwise within the file specified.
Options
T Sends the captured output to a tape drive (you are prompted for the specific unit).
P Prints the captured output to the currently-selected formqueue.
O Overwrites the specified item with the captured output, if it already exists.
H Displays help information about this command.
The T and P options cannot be used together.
Prompt
In response to the TO: prompt, you can:
- Press return to display the captured output on the screen (this is not allowed with the T option).
- Specify a simple item-id, in which case the captured output is appended to that item in the SYSDATA file.
- Specify a file and item by using the (file-specifier item-id syntax.
If a specified item doesn't already exist it is created. If the item does exist and the O option is used, the item is overwritten; otherwise, the captured output is appended to the existing item. This is true even for tape output.
Restrictions
Made available in the SYSMAN and SYSPROG accounts, but may be copied to user accounts.
Examples
In the following example the output of a PRNT-CATALOG command is appended to item ZZ in SYSDATA:
:CAPTURE PRINT-CATALOG MD DIR-VIEW
TO:ZZ
The report has been saved to ZZ in SYSDATA.
In the following example the output of an ANALYZE command is printed to the currently-selected formqueue. Note that the ANALYZE command line is enclosed in quotation marks because it includes an option.
:CAPTURE "ANALYZE 403 (U" (P
In the following example the output of the WHO command overwrites item ZZ in SYSDATA, which is then T-DUMPed to tape unit #1.
:CAPTURE WHO (TO
Enter tape unit desired:1
TO:ZZ
The report has been saved to ZZ in SYSDATA. T-DUMPing ZZ from SYSDATA to tape. 1 items dumped.