You are on page 1of 2

FileAid Dumps for the COBOL Programmer

My favorite FileAid feature is the ability to print dumps which utlilize a COBOL copy
library. Consider the following file, appropriately named JUNK. This file contains a label
in columns 1-8, a zoned decimal number in columns 9-11, and a packed decimal number
in columns 12-13. Here's the COBOL copy library member which describes this dataset:

01 JUNK-RECORD.
05 JR-LABEL PIC X(8).
05 JR-ZONED PIC 9(3).
05 JR-PACKED PIC S9(3) COMP-3.

Here are the second and third records of the file as viewed through ISPF with HEX ON.
Notice that record 3 contains a non-printable character in position 5 of JR-LABEL
(X'EE') and non-numeric data in JR-ZONED (all C'X') and in JR-PACKED (all
C'Y').

EDIT JCQUBX0.JUNK Columns 00001 00013


Command ===> Scroll ===> HALF
****** *********************** Top of Data ************************

-------------------------------------------------------------------
000002 SECOND 222
ECCDDC44FFF22
253654002222C
-------------------------------------------------------------------
000003 OOPS XXXYY
DDDEE444EEEEE
6672E00077788
-------------------------------------------------------------------
You've probably used IDCAMS for dumping files. And, if so, you'll probably agree that
it's format is hardly "user friendly." Just to remind you, here's a portion of an IDCAMS
file for the JUNK file.

RECORD SEQUENCE NUMBER - 2


000000 E2C5C3D6 D5C44040 F2F2F222 2C *SECOND 222.. *

RECORD SEQUENCE NUMBER - 3


000000 D6D6D7E2 EE404040 E7E7E7E8 E8 *OOPS. XXXYY *

FileAid has the capability of producing a dump which shows the records field-by-field,
using the field names and formats as specified in the indicated copy library member. The
JCL is as follows:

//* JOBCARD
//STEP010 EXEC PGM=FILEAID
//DD01 DD DSN=JCQUBX0.JUNK,DISP=SHR
//DD01M DD DSN=JCQUBX0.TRAINING.COPYLIB,DISP=SHR
//SYSIN DD *
$$DD01 FPRINT MAP=JUNKREC
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*

The FileAid dump for the second and third records appears as follows. Note that non-
printable characters in PIC X fields are displayed in their hexadecimal form, as are non-
numerics in PIC 9 fields. This can be very helpful in debugging!

RECORD: 2 JUNK-RECORD
LENGTH: 13
---- FIELD LEVEL/NAME ------- -FORMAT- ----+----1----+----2----

5 JR-LABEL 8/AN SECOND


5 JR-ZONED 3/NUM 222
5 JR-PACKED 2/PS 222

RECORD: 3 JUNK-RECORD
LENGTH: 13
---- FIELD LEVEL/NAME ------- -FORMAT- ----+----1----+----2----
5 JR-LABEL 8/AN X'D6D6D7E2EE404040'
5 JR-ZONED 3/NUM X'E7E7E7'
5 JR-PACKED 2/PS X'E8E8'

You might also like