These CANDE examples show a variety of task requests.
Example 1
The following CANDE command initiates a FILEDATA run with four task requests:
-
The DEFINEOUTPUT request defines the output for the following requests. The output is sent to a terminal screen and has 79 characters per line.
-
The ATTRIBUTES request reports the LASTRECORD and security information on all files in the XYZ directory.
-
The COPYDECK request produces a copydeck of all files with two-level file names in the XYZ directory.
-
The HEADERCONTENTS request produces a report from the family MYPACK. In this request, the output is sent to the printer.
RUN *SYSTEM/FILEDATA ("DEFINEOUTPUT: MEDIATYPE = SCREEN LINEWIDTH = 79; ATTRIBUTES: LASTRECORD SECURITY DIRECTORY = XYZ; COPYDECK: LEVEL = 2 DIRECTORY = XYZ; HEADERCONTENTS: PRINTER FAMILYNAME = MYPACK");
Example 2
The following CANDE command initiates a FILEDATA run with three task requests:
-
NOREPORTS does not produce a report but creates a database MYDB. MYDB contains information for all the files on the family MYPACK. MYDB is used in the other two requests.
-
FILENAMES.
-
ATTRIBUTES.
FILEDATA retrieves the information from the database rather than having to gather the information independently for each task request.
RUN *SYSTEM/FILEDATA ("NOREPORTS: NEWDATABASE = MYDB FAMILYNAME = MYPACK; FILENAMES: NAMESONLY DATABASE = MYDB; ATTRIBUTES: ALL DATABASE = MYDB");
Example 3
The following CANDE command consists of four requests and generates three FILEDATA reports:
-
The DEFINEOUTPUT request defines the output for the requests that follow it. The output is sent to a remote terminal assumed to be a hard-copy print device. The length of each line is 80 characters, and the page size is 24 lines.
-
The STRUCTUREMAP request produces a map that shows the file storage layout for all files under the usercode JPLANGE.
-
The CHECKERBOARD request reports on all files from the pack OTHERPACK.
-
The ATTRIBUTES request reports on the file MYFILE. The file name and the timestamp are included in the report.
RUN *SYSTEM/FILEDATA ("DEFINEOUTPUT: MEDIATYPE = TTY LINEWIDTH = 80 PAGESIZE = 24; STRUCTUREMAP: TITLE=(JPLANGE); CHECKERBOARD: FAMILYNAME = OTHERPACK; ATTRIBUTES: TITLE = MYFILE TIMESTAMP");