FATS Advert

FATS and FATAR

InnovationDP provides two tape utilities for z/OS tape media; FATS(Fast Analysis of Tape Surfaces) and FATAR(Fast Analysis of Tape And Recovery).
Essentially, FATS is a tool to manage physical tape media, while FATAR is a tool to manage physical data on tape. These two utilities are generally sold as a single product. FATSCOPY is an optional feature that will automatically stack datasets on tape, either to make better utilisation of large capacity cartridges, or to move data to new types of cartridge.

The products will run against any IBM or IBM-compatible tape drive supported by z/OS. They can also do some checking against the virtual volumes in an IBM VTS, where that checking makes sense. Principally this will be for reading, labeling and verification purposes.

    GFS Advert

Here is a summary of the key features available in FATS/FATAR and FATSCOPY, these buttons link to sections in the text below:

   EADM Advert

Accelerate DB2 Write with zHyperWrite and "EADM™ by Improving DB2 Logs Volumes Response Time:

Secure Data Erase with FATS

FATS can erase some or all of the data from a z/OS tape. This feature may be used to erase the entire contents of a tape or just the residual data on tape beyond the end of tape marker. FATS uses hardware features that write a random pattern to tape cartridges, so the impact on tape controllers and channels is minimal.

This job will erase all the data on 50 cartridges with consecutive volsers. It will use two cartridge drives.

//ERASE EXEC PGM=FATS,REGION=0M
//SYSPRINT DD SYSOUT=*
//SYSPRIN1 DD SYSOUT=*
//SYSPRIN2 DD SYSOUT=*
//SUMMPRT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//TAPE1 DD DSN=DUMMY,UNIT=(3590,,DEFER),LABEL=(,BLP),DISP=(,KEEP)
//TAPE2 DD DSN=DUMMY,UNIT=(3590,,DEFER),LABEL=(,BLP),DISP=(,KEEP)
//SYSIN DD *
  DEFAULT VOLINCR=1,MAXVOLN=25
  ERASE(1) VOL=A10001
  ERASE(2) VOL=A10026

When z/OS writes a file to a tape, it puts an end of tape marker on the tape after the file. That means that when 'normal' utilities like IEBGENER reach the end of tape marker they know they are at the end of the data and they do not try to go past it. If you are sending a tape offsite, then typically that tape will have been used before. Your new application may write a small file to the tape, and an end of tape marker. You then ship that tape offsite, possibly with the application data encrypted, but you do not know what else is on the tape on the other side of the marker. A lot of utilities exist (Like FATAR) that are specifically designed to be able to read past the end of the marker, and they will be able to read that old, residual data. This means that you are exposed if that tape gets lost, or is used maliciously by the recipient.

This job will erase the residual data on tape E01020, which is to be sent offsite. This ensures that older data past the tape mark cannot be accessed. The 'live' data before the tape mark will not be affected.

//FATS EXEC PGM=FATS
//SYSPRINT DD SYSOUT=*
//SYSPRIN1 DD SYSOUT=*
//SUMMPRT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//TAPE1 DD DSN=FATS,UNIT=(3590,,DEFER),
//         LABEL=(,BLP),DISP=(,KEEP)
//SYSIN DD *
  ERASE(1) RESIDUAL,VOL=E01020

Tape Media Certification with FATS

Certification is used for new tapes, or old tapes that contain obsolete data. TAKE CARE - Certification will DESTROY EXISTING DATA. FATS certifies a tape by writing a data pattern right down the full length of the tape. The tape hardware then reads back those blocks to ensure they have been written correctly. The hardware would normally attempt to correct these errors, but FATS prevents this and instead tries to re-write the data over the same piece of tape again. By default it will try to do this 10 times before deciding that the tape is permanently damaged. If FATS manages to re-write the data successfully, then it indicates that it had a temporary error. Temporary errors are typically caused by a piece of dust on the tape, and the re-write process dislodges it.

This job will certify a tape labeled as M020DB. The WRITE(1) parameter refers to the TAPE1 DD statement, MAXERR=5 means FATS will try to re-write 5 times if it finds an error, before it marks the tape as permanently damaged. MAXCERR=12 means that if FATS finds that 12 inches of tape contain permanent errors, then it will mark the tape as faulty.

//CERTLAB EXEC PGM=FATS,REGION=0M
//SYSPRINT DD SYSOUT=*
//SYSPRIN1 DD SYSOUT=*
//SUMMPRT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//TAPE1 DD DSN=FATS,UNIT=(3590,,DEFER),
//         LABEL=(,BLP),DISP=(,KEEP)
//SYSIN DD *
  WRITE(1) VOL=(M020DB),MAXERR=5,MAXCERR=12

It is possible to certify a range of tapes if they have volsers whose ending characters are numeric. For example, if the initial volser is A00100, you could specify control statements like VOL=(A00100),VOLINCR=1,MAXVOLN=10. FATS will then certify all tapes with volsers between A00100 and A00109 inclusive.

Tape Verification using FATS

Verification is used to check that valid data on existing tapes is readable. This could be useful to run occasionally against old archive tapes. FATS will attempt to read all the data on a tape, and will retry any failed reads 10 times by default, before it reports that the tape cannot be read. The job will produce a report that shows the location on tape of any errors, both temporary and permanent, and the affected file and record numbers. The FATAR verification function provides a more detailed report.

This job will verify a tape called P90237

//VERIFY EXEC PGM=FATS,REGION=0M
//SYSPRINT DD SYSOUT=*
//SYSPRIN1 DD SYSOUT=*
//SUMMPRT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//TAPE1 DD DSN=DATA.SET.NAME1,UNIT=3490,
//         VOL=SER=P90237,DISP=OLD
//SYSIN DD *
  READ(1)

Tape labeling with FATS

FATS can label up z/OS magnetic tapes with either standard IBM labels, ANSI V3 labels, or as unlabelled tapes with just a tape mark.

A typical FATS LABEL job to label up 100 tapes with standard IBM labels from XMP000 to XMP099, looks like

//LABEL EXEC PGM=FATS,REGION=0M
//SYSPRINT DD SYSOUT=*
//SYSPRIN1 DD SYSOUT=*
//SUMMPRT DD SYSOUT=*
//TAPE1 DD DSN=FATS,UNIT=(3590,,DEFER),
//         LABEL=(,BLP),DISP=(,KEEP)
//SYSIN DD *
  LABEL(1) VOL=(XMP000),VOLINCR=1,MAXVOLN=100

Tape mapping with FATAR

Many years ago, I worked in a telecoms company data centre. We got several old 3420 reel to reel tapes in every day from other companies and other parts of the business. Some tapes were labeled with standard MVS labels, some were labeled but MVS could not read them, some were unlabelled. Some tapes came with full documentation about magnetic labels, block sizes, record lengths and all the other details you need to read a foreign tape. Some came with no documentation at all.
I found the FATAR ANALYZE function to be very useful to work out just what was on all those strange tapes.

A typical FATAR ANALYZE job is this simple

//FATAR EXEC PGM=FATAR,REGION=0M
//SYSPRINT DD SYSOUT=*
//TAPESUMM DD SYSOUT=*
//TAPEIN DD DSN=FIRSTDS,UNIT=TAPE,VOL=SER=999999,
//  LABEL=(,BLP,EXPDT=98000),DISP=OLD
//SYSIN DD *
  ANALYZE

FATAR prints out a DETAIL report to the SYSPRINT file that tells you; what the tape magnetic label is, how many files are on the tape and what they are called, and the RECFM, LRECL, BLKSIZE of each file. This is needed to copy the tape, while the creation date, expiration date, details of the creating job and the number of data blocks can also be useful. FATAR will also tell you if it found any temporary or permanent errors whilst it was reading the tape.

ANALYZE has a few optional parameters that can help you get more data about your tapes.
LENCHK will check that a file defined as fixed length has valid fixed length blocks
LBLPRT=DUMP will print labels in dump format (HEX and EBCDIC).
PRINT,LF=ALL,B=1-3 will print blocks 1 to 3 of every data file.
NUMFILES= can be used to restrict the number of files to be analysed. This parameter can be combined with the LABEL parameter on the TAPE DD statement to select files on the tape. For example LABEL=3 on the TAPE DD statement combined with NUMFILES=2 will then check files 3 and 4 on the tape.
PRTLEN=x when combined with PRINT ALL will print out the first x bytes of each data block.

Tape copying with FATAR

The ANALYZE command can be used to copy tapes when combined with TAPEIN and TAPEOUT DD statements. If you want to take an exact image copy of a tape, including volser and labels, or you want to reblock tape data, then FATAR is the tool to use. If you want to stack tapes, or do bulk copies, then FATSCOPY is the best tool.

This is an example Image Copy job.

//FATAR EXEC PGM=FATAR,REGION=0M
//SYSPRINT DD SYSOUT=*
//TAPESUMM DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//TAPEIN DD DSN=input.file.name,UNIT=3590,
//     VOL=SER=XYX123,DISP=OLD
//TAPEOUT DD DSN=NOT.USED,UNIT=3590,
// LABEL=(,BLP),DISP=(NEW,KEEP)
//SYSIN DD *
  ANALYZE LABELS=IMAGE

You need to specify LABEL=(,BLP) on the TAPEOUT DD statement so that all labels and data can be copied to the output tape, so your job must run under a USERID with RACF authority to use BLP.

This second example will copy two files at labels 3 and 4 from an input tape, will rename to different, catalogued file names and also re-block them to a more efficient size.


//FATAR EXEC PGM=FATAR,REGION=0M
//SYSPRINT DD SYSOUT=*
//TAPESUMM DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//TAPEIN DD DSN=third.file.name,UNIT=3590,
//    VOL=SER=AX0010,LABEL=3,DISP=OLD
//TAPEOUT DD DSN=DUMMY,UNIT=3590,DISP=(NEW,KEEP)
//SYSIN DD *
  ANALYZE
  NUMFILES=2,REBLOCK=32760,CAT=YES
  RENAME LF=3,NEWN=SWP.HMCE.FILE3
  RENAME LF=4,NEWN=SWP.HMCE.FILE4

FATAR is capable of doing lots of complicated types of tape copy; the manual is well worth reading.

Copying Tapes and stacking datasets with FATSCOPY

FATSCOPY is an extra cost option feature of FATAR, but worthwhile if you need to copy a lot of tape files.

You have a powerful range of options available for you to use to select your input tapes. You can select by file name or file name pattern mask, volser, device type, or various combinations of jobname, creation dates and expiration dates. As these selection criteria can be complex, FATSCOPY has a simulation feature that you can use to check what input tapes will be selected and it will give you an indication of how many output tapes will be required.

This simple example job could be used to convert tapes to different media. It selects ALL datasets currently catalogued on 3490 tapes and copies and stacks them to fewer 3592 tapes. The MULTIFILE=YES parameter is needed to cope with tapes that contain more than one file. The moved files will be recatalogued to the new tapes by default, and the old tapes will be returned to scratch. Watch out for uncatalogued tape files, they could be accidentally deleted by this method.

//CONVERT EXEC PGM=FATSCOPY,REGION=0M
//SYSPRINT DD SYSOUT=*
//SELRPT DD SYSOUT=*
//COPYRPT DD SYSOUT=*
//TAPESUMM DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//TAPEOUT DD DSN=OUTPUT,UNIT=3592,DISP=(,KEEP)
//SYSIN DD *
  COPY TMSINPUT=SCRATCH,MULTIFILE=YES
  SELECT CATDSN=**,DEVTYPE=3490

This next example can be used to stack a number of smaller tape datasets onto fewer tapes. This could be useful to properly utilise large tapes like the T10000 or the TS1120. Here we are selecting all tapes belonging to an application identified by a pattern mask of CSRP.*.IS%CR*.**, and created between Julian dates 2016.041 and 2016.047. They will be copied and stacked onto an IBM 3592 cartridge. Once again, the copied files will be recataloged to the output tape, and the input tapes will be returned to scratch status.

//STACK EXEC PGM=FATSCOPY,REGION=0M
//SYSPRINT DD SYSOUT=*
//SELRPT DD SYSOUT=*
//COPYRPT DD SYSOUT=*
//TAPESUMM DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//TAPEOUT DD DSN=OUTPUT,UNIT=3592,DISP=(,KEEP)
//SYSIN DD *
COPY
  SELECT CATDSN=CSRP.*.IS%CR*.**,
  CRDATE>=2016.041,CRDATE<=2016.047

Error Recovery With FATAR

Faulty blocks

If you have a faulty block on a tape, The FATAR ANALYZE function can identify that faulty block. FATAR can also recover data from this faulty tape, either dropping the faulty block, or recovering the data if it is able to do so.

The job below will copy all the files on faulty tape A01020 to a scratch tape, including any files that are located past the faulty block, then will drop that block it it can't read it.

//FATAR EXEC PGM=FATAR,REGION=0M
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//TAPEIN DD DSN=FIRSTDS,UNIT=TAPE,VOL=SER=A01020,DISP=OLD
//TAPEOUT DD DSN=DUMMY,UNIT=TAPE,DISP=(NEW,KEEP)
//SYSIN DD *
  ANALYZE CAT=RECAT,RETRY=256

Missing end of tape marker

There are a number of reasons why a tape can end up without a valid end of tape mark. This means the tape cannot be read with normal utilities. To fix this you need to identify the last good block with an ANALYZE job, then copy all the data off the tape up to that last good block.
In this example, a previous FATAR ANALYZE job showed that block 1459 is the last good block of the proper length and a data check occurs immediately after it. The following FATAR COPY job will copy the tape up to and including block 1459 onto a scratch tape with proper labels.

//FATAR EXEC PGM=FATAR,REGION=0M
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//TAPEIN DD DSN=A.NAME,UNIT=3590,
//         VOL=SER=333333,DISP=OLD
//TAPEOUT DD DSN=DUMMY,UNIT=3590,DISP=(NEW,KEEP)
//SYSIN DD *
  ANALYZE ENDAFTER=(LF=1,B=1459)

Recovering data from overwritten tapes

When you write a dataset to a tape, after it writes the last data block, the cartridge drives will write an End of Tape mark on the tape. Then you discover that the original data contained critical business information and you need to get as much of it back as you can. The probability is that you will have a partially overwritten file, and maybe some complete older files, after the EOD tape mark.

This job can be used to try to recover data from an overwritten tape. You need to provide the DCB information on the TAPEIN DD statement as FATAR cannot get it from the original header labels. LABELS=EOD will tell FATAR to read past the EOD tape mark.

//FATAR EXEC PGM=FATAR,REGION=0M
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//TAPEIN DD DSN=ORIGINAL.FILE.NAME,UNIT=3590,
//         VOL=SER=xxxxxx,DISP=OLD,
//         DCB=(RECFM=FB,LRECL=125,BLKSIZE=32750)
//TAPEOUT DD DSN=ORIGINAL.FILE.NAME,UNIT=3590,DISP=(NEW,KEEP)
//SYSIN DD *
  ANALYZE LABELS=EOD,CAT=RECAT,BLP

FATS/FATAR can also be invoked through a full set of ISPF panels that are provided with the product. The more experienced user might prefer batch jobs, but the panels are easy to use. It is possible to restrict certain panels like FATS ERASE to prevent them from being invoked by inexperienced people.

back to top