In this section: |
Extract files save lines of user input and output during a FOCUS session.
By default, extract files are written to the z/VM minidisk specified by the SET TEMP command. If you do not issue the SET TEMP command, extract files are written to the minidisk with the largest amount of unused space to which you have write access. The name of an extract file is the AS name specified in the command that creates it or, if no AS name is specified, a default name (HOLD, SAVE, or SAVB). The file type is assigned based on the extract file format.
You use a FILEDEF command to assign a file name, file type, and file mode for an extract file.
In the case of a HOLD file, the Master File is not affected by the FILEDEF command. The Master File is written to the minidisk specified by the SET TEMP command, and its name is taken from the AS name in the HOLD command. If the HOLD command does not contain an AS phrase, the Master File name is HOLD.
How to: Reference: |
As soon as FOCUS is entered, it searches for the disk with the largest available space that you have write access to and will place all work files there. The TEMP DISK parameter may be used to specify a particular disk for the creation of work and extract files. Changing the TEMP DISK will only affect the disk on which new files are created.
The following places all extract files on the D disk:
SET TEMP DISK = D
The following should be considered when using the FILEDEF command:
Issue the following command before creating the extract file
CMS FILEDEF ddname DISK filename filetype filemode
where:
Is the AS name from the HOLD, SAVE, or SAVB command. If the command did not specify an AS name, the ddname is HOLD, SAVE, or SAVB.
Is the file name for the extract file.
Is the file type for the extract file.
Is the file mode for the extract file. You must have write access to this minidisk. If you do not have write access, the following error message is returned:
(FOC350) ERROR WRITING OUTPUT FILE: filename
In the following examples, SET TEMP = T. The request is:
TABLE FILE EMPLOYEE PRINT CURR_SAL BY LAST_NAME BY FIRST_NAME ON TABLE HOLD AS CURRSAL END
Running this request with no FILEDEF command creates the following files:
CURRSAL MASTER T1 CURRSAL FOCTEMP T1
Issue the following FILEDEF command:
CMS FILEDEF CURRSAL DISK SALLIST DATA A
Now, running the same request creates the following files:
CURRSAL MASTER T1 SALLIST DATA A1
Note that the file name, file type, and destination minidisk for the extract file are taken from the FILEDEF command. The file name and destination minidisk for the Master File are not.
How to: |
A HOLD file is a sequential data source that contains the results of a report request. To save report output in a HOLD file, you must execute the HOLD command.
If you specify the FORMAT FOCUS option with HOLD, FOCUS creates normal MASTER and FOCTEMP files, each with the file name FOC$HOLD, as well as the Master File for the final FOCUS data source. These files are then used as input to the MODIFY that creates the final FOCUS data source . The new FOCUS data source and Master File are created on your temporary disk (that is, the disk specified with the FOCUS command SET TEMP disk).
If you create a FOCUS data source larger than one gigabyte using HOLD FORMAT FOCUS, you will need a very large amount of TEMP space available.
HOLD [AS ddname]
where:
Is the name of the file that will contain the report output. The default name is HOLD. The fileid used is ddname FOCTEMP unless you specify the format option (see the Creating Reports manual). FOCUS also creates ddname MASTER to contain a Master File that describes the report output.
How to: |
A SAVB contains the results of a report request with all numeric report fields in binary format. The file cannot be printed. Also, all character fields are padded with spaces to a multiple of 4 bytes.
How to: |
A SAVE file contains the results of a report request with all columns in the report in printable, character format with no spaces between columns.
How to: Reference: |
LOG and transaction files contain FOCUS transactions.
To log transactions on a file, first define the file with this command
FILEDEF ddname DISK fileid (RECFM recfm LRECL lrecl
where:
Is the ddname of the file specified by the LOG category ON ddname statement.
Is the CMS fileid of the file receiving the transactions.
Is the format of the file (F for fixed, V for variable).
Is the file record length. The proper record length is discussed in the Maintaining Databases manual.
For example, this request logs transactions in the file EMPTRANS TRANSACT A:
CMS FILEDEF ALLTRANS DISK EMPTRANS TRANSACT A (RECFM F LRECL 24
MODIFY FILE EMPLOYEE LOG TRANS ON ALLTRANS PROMPT EMP_ID CURR_SAL VALIDATE SAL_TEST = IF CURR_SAL GT 50000 THEN 0 ELSE 1; MATCH EMP_ID ON MATCH UPDATE CURR_SAL ON NOMATCH REJECT DATA
To have a MODIFY request read a transaction file, define the file to the ddname specified in the FIXFORM, FREEFORM, or DATA statements by entering the CMS command
FILEDEF ddname DISK fileid (LRECL lrecl RECFM recfm BLKSIZE blksize)
where:
Is the ddname specified in the FIXFORM or DATA statement.
Is the CMS fileid of the transaction file.
When you create a transaction file to be read by the FIXFORM statement, be sure that it has a fixed-length record format (RECFM F).
You do not need to define the file if the file has a file type of DATA, a file mode of A and the records are 80-byte fixed format.
For example, this request reads fixed-format records from the file EMPFILE DATA A:
CMS FILEDEF FLOAFILE DISK EMPFILE DATA A
MODIFY FILE EMPLOYEE COMPUTE FLOATSAL/F8=; FIXFORM EMP_ID/12 FLOATSAL/F4 COMPUTE CURR_SAL = FLOATSAL; MATCH EMP_ID ON NOMATCH REJECT ON MATCH UPDATE CURR_SAL DATA ON FLOAFILE END
To send MODIFY TYPE messages to a file, first define the file with this CMS command
FILEDEF ddname DISK fileid (RECFM recfm LRECL lrecl
where:
Is the ddname of the file specified by the TYPE ON ddname statement.
Is the CMS fileid of the file receiving the messages.
Is the format of the file (F for fixed, V for variable).
Is the file record length.
For example, this request records accepted transactions in the file ACCEPT TRANS A and rejected transactions in the file REJECT TRANS A:
CMS FILEDEF ACCFILE DISK ACCEPT TRANS A (RECFM F LRECL 80 CMS FILEDEF REJFILE DISK REJECT TRANS A (RECFM F LRECL 80
MODIFY FILE EMPLOYEE PROMPT EMP_ID CURR_SAL MATCH EMP_ID ON MATCH TYPE ON ACCFILE "<EMP_ID <12 <CURR_SAL" ON MATCH UPDATE CURR_SAL ON NOMATCH TYPE ON REJFILE "<EMP_ID <12 <CURR_SAL" ON NOMATCH REJECT DATA
Information Builders |