Some platforms support redirection of output via special characters like >, >>, and |. You can save the output from a command by entering ADSM administrative client redirection characters at the end of the command. Redirection characters (>, >>, and |) direct the output of a command to a file you specify instead of to your screen.
Note: | Redirection characters cannot be specified when you issue administrative commands. |
This type of redirecting output is an alternative to using the -OUTfile=filename option. You can redirect output with the OUTfile option if you do not specify a destination filename. This option is only available in batch mode. ADSM formats the redirected output as if you redirected the output in interactive mode. Redirection is only available from the administrative client in the batch and interactive modes. Redirection can also be used in console and mode modes in environments that support redirection natively.
You can use console or mount mode for your administrative client session to redirect command output to a program. This allows you to write your own programs to automate operations. For example:
dsmadmc -console -id=admin -pa=xxx | filter.exe
would redirect all output going to the administrative client in console mode to a program called filter.exe. The program then monitors the output for individual messages as they occur and takes appropriate action, such as sending mail to another user.
A single greater than sign (>) indicates that ADSM writes the output to a new file or writes over an existing file. For example, to write the output of a QUERY DOMAIN command to a new file, enter:
query domain acctg > dominfo.acc
Double greater than signs (>>) indicates that ADSM appends the output to the end of an existing file. For example, to append the output of a QUERY DOMAIN command to the end of an existing file in interactive mode, enter:
query domain acctg >> dominfo.acc
To append the output of a QUERY DOMAIN command to the end of an existing file in batch mode, enter:
dsmadmc query domain acctg -outfile >> dominfo.acc
Redirection characters must be preceded by and followed by at least one blank space. If a file with the name you specify does not exist, ADSM creates a new file with that name.
You can redirect output from any command. However, the most common use for redirecting output is to save the output from query commands. The output from some query commands can be quite lengthy, and it can be easier for you to browse the contents of a file or, in some cases, print the contents of the file.
Normally, ADSM formats query output according to your screen or window width. If the data does not fit across the screen, then separate lines will be used for each output field. When you redirect the output of a query command, it is written to the output file with a line width of about 500 characters. This means that the output from query commands can format differently in redirected output. However, only the format of the output changes, the content is not modified.
When redirecting output to a file, follow the naming conventions of the administrative client running on your operating system. The naming conventions for some operating systems are presented below:
You can delimit the file name and file type with a period (fn.ft), or you can delimit them with a blank space. If you delimit them with a blank space, the file name and file type must be enclosed in matching quotation marks ('fn ft').
In TSO, the normal TSO data set prefix rules apply. In general, the user ID is added only if the file name is not enclosed in quotation marks.