If you run the program from a WFL job, the output is directed to a printer file.
Examples
The following examples use WFL statements to perform various PDIR utility tasks.
Basic Syntax
The following is an example of a WFL statement to run the program:
RUN *SYSTEM/PDIR ("<PDIR request>")
Example Using CARD File
You can direct the utilities to read input from a KIND=READER file called CARD. You should use this option if the parameter exceeds the maximum WFL string size (1024 characters). A parameter string containing a single asterisk causes the utilities to read input from the CARD file which can be file-equated to a disk file. The first 80 characters of each record will be used. The following job demonstrates this option:
BEGIN JOB PDIR; RUN SYSTEM/PDIR ("*"); DATA CARD *SYSTEM/= SHOW LASTACCESSDATE, SECTORS SORT - SECTORS ?END JOB
Example Using Wild Card Characters
The following statement starts a job that reports all the files that have a second name starting with the letter M in the *SYSTEM directory on PACK and sorts them in descending order based on the number of sectors.
RUN *SYSTEM/PDIR ("*SYSTEM/M= ON PACK SORT - SECTORS")