Example: A command output file
This example shows how to write the output from a control language (CL) command directly to a database file. You can use the Display Program References (DSPPGMREF) command to collect information for all compiled programs in all libraries and place the output in a database file named DBROUT:
DSPPGMREF PGM(*ALL/*ALL) OUTPUT(*OUTFILE) OUTFILE(DSTPRODLB/DBROUT)You can use Query to process the output file. Another way to process the output file is to create a logical file to select information from the file. The following example shows the DDS for such a logical file. Records are selected based on the file name.
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8 A* Logical file DBROUTL for query A A R DBROUTL PFILE(DBROUT) A S WHFNAM VALUES('ORDHDRL' 'ORDFILL') A
Parent topic:
Writing the output from a command directly to a database file