When receiving an A004 Catastrophic Error, one reason is because the EZTVFM file is filled and cannot span work packs.
Therefore, the resolution is to use Report Workfiles. Please see the steps below on using Report Workfiles.
CA Easytrieve Report Generator, release 11.6
HOW TO USE A REPORT WORKFILE:
1. ADD A DD STATEMENT TO YOUR JCL:
//RPTWRK1 DD UNIT=SYSDA,SPACE=(CYL,1) *or whatever space you need
//RPTWRK2 DD UNIT=SYSDA,SPACE=(CYL,1) *or whatever space you need
and so on depending on the number of reports your program generates.
Please add these statements to your program making the number of records great enough to write out at least one record to each report:
IF RECORD-COUNT GT 1000
STOP
END-IF
After the run, look at the file statistics for EZTR00# report workfiles. REPORT 1 gets spooled to EZTR001, REPORT 2 gets spooled to EZTR002, etc. For each file, you should see the VFM record length (LRECL). This is the length you should specify for each of your RPTWORK files. In this example, the EZTR001 file had an lrecl of 60, so this is what was specified for RPTWRK1. EZTR002 had an lrecl of 42, therefore RPTWRK2 has an lrecl of 42. The only other way to get the LRECL for the report workfile is to add up the lengths of ALL fields (file fields, ‘w’ type working storage fields) used in the REPORT section.
3. Add to your REPORT statement:
REPORT RPT1...FILE RPTWRK1...
REPORT RPT2…FILE RPTWRK2…
USING REPORT WORKFILES MEANS THAT AS THE INFORMATION NEEDED FOR EACH REPORT IS SPOOLED OUT TO THE INDIVIDUAL WORKFILES YOU ALLOCATED, INSTEAD OF GOING TO EZTVFM. THESE WORKFILES MAY SPAN PACKS WHILE OUR EZTVFM FILE CANNOT SPAN PACKS.