|
Entire document Available as PDF |
Table of Contents
The DFHEOFMT program writes an end-of-file (EOF) on every track in a data set. Any physical sequential (PS) data set can be formatted using this program. One use of DFHEOFMT is to format CICS log files, which
are physical sequential data sets.
As each record is written to the data set, a last-record pointer (called a TTR) is updated to indicate the current position in the data set. Thus when the job either ABENDs or closes the data set normally, the TTR will be updated to reflect the
current position in the data set. By opening the data set with DISP=MOD, you can continue to write records onto the end of the data set. If there is a system failure, the data set is not properly closed and the TTR is not updated.
The TTR will indicate the last record in the data set that was entered when the last close was done. This TTR would be invalid if any new records had been added to the data set.
DFHMDSET can be used to reset the TTR to the proper place in the data set. DFHEOFMT is used to help DFHMDSET determine where the real end of data is in the data set.
DFHEOFMT operates in single-data-set mode or multiple-data-set mode. Single-data-set mode is specified by giving the DDname of the data set to be formatted using the PARM keyword.
Multiple-data-set mode is specified by supplying a DDname prefix. The prefix will be extended to eight characters by concatenation of digits. The numbers appended will be incremented by one until a DD statement
cannot be found. For example, if the DDname prefix is 'FVS', the DD statements FVS00001, FVS00002, etc., will be assumed. Examples of PARM keywords for single and multiple data sets
follow.
PARM='ddname'Single -- formats one data set
PARM='*ddpre'Multiple -- formats more than one data set
Figure 1 shows an example to format the data set specified by the DD statement TARGET.
Figure 6. JCL for DFHEOFMT
//jobnameJOB ,'your name',CLASS=class,TIME=(mm,ss),LINES=lines/*ROUTE PRINTnode.location// EXEC PGM=DFHEOFMT,PARM='TARGET' //TARGET DD DSN=data.set.name,DISP=OLD
Figure 2 shows an example to format all data sets specified by DD statements with the prefix TARGET.
Figure 7. Specifying Multiple Data Sets for DFHEOFMT
//jobnameJOB ,'your name',CLASS=class,TIME=(mm,ss),LINES=lines /*ROUTE PRINTnode.location// EXEC PGM=DFHEOFMT,PARM='*TARGET' //TARGET01 DD DSN=data.set.name,DISP=OLD //TARGET02 DD DSN=data.set.name,DISP=OLD //TARGET03 DD DSN=data.set.name,DISP=OLD
Error conditions are indicated by condition codes other than zero as follows:
| Completion Code | ABEND Action | Single DS Mode | Multiple DS Mode |
|---|---|---|---|
| 4 | NODUMP | DDNAME NOT GIVEN | DDNAME PREFIX NOT GIVEN |
| 8 | NODUMP | DD CARD MISSING | N/A (MAPS TO 0) |
| 12 | NODUMP | DD DUMMY OR NONDASD | DD DUMMY OR NONDASD |
| 16 | NODUMP | DSORG NOT PS | DSORG NOT PS |
| 20 | DUMP | OPEN FAILED | OPEN FAILED |
| 24 | DUMP | I/O ERROR | I/O ERROR |
You can use the keyword ABEND as the first character in the PARM field so that an error condition can be translated into a user ABEND of the same value. The column labeled ABEND
action describes whether or not a particular error condition will be accompanied by a dump. Each error condition will be accompanied by an appropriate error message in the JES2 log.
The currently supported DASD device is the IBM 3390.