I'm attempting to use the "McGyver Technique" to generate multiple record types from a single row of data. Used -WRITE to create the file with RECTYPE successfully, and can -READ & -TYPE from the file just fine. But when I try to use TABLE to print the contents of the file I get 0 records.
I created the following MFD:
FILENAME=RECTYPES, SUFFIX=FIX , $
SEGMENT=RECTYPE, SEGTYPE=S0, $
FIELDNAME=BLANKS, ALIAS=BLANKS, USAGE=A1, ACTUAL=A1,$
FIELDNAME=RECTYPE, ALIAS=, USAGE=A5, ACTUAL=A5,$
FIELDNAME=DELIMITER, ALIAS=, USAGE=A1, ACTUAL=A1,$
RECTYPES.DAT looks like this after the run:
101 $
202 $
303P01$
403P02$
504 $
611 $
744 $
860 $
Following is an ECHO of the procedure as it runs:
FILEDEF RECTYPES DISK E:\ibi\apps\test\RECTYPES.DAT
-RUN
-***
-WRITE RECTYPES 101 $
-WRITE RECTYPES 202 $
-WRITE RECTYPES 303P01$
-WRITE RECTYPES 403P02$
-WRITE RECTYPES 504 $
-WRITE RECTYPES 611 $
-WRITE RECTYPES 744 $
-WRITE RECTYPES 860 $
-***
-SET &ECHO=OFF ;
RECTYPE=01
RECTYPE=02
RECTYPE=03P01
RECTYPE=03P02
RECTYPE=04
RECTYPE=11
RECTYPE=44
RECTYPE=60
Lname Device Lrecl Recfm Append Filename
============================================================
RECTYPES DISK 0 V E:\ibi\apps\test\RECTYPES.DAT
0 NUMBER OF ERRORS= 0
NUMBER OF SEGMENTS= 1 ( REAL= 1 VIRTUAL= 0 )
NUMBER OF FIELDS= 3 INDEXES= 0 FILES= 1
TOTAL LENGTH OF ALL FIELDS= 7
TABLE FILE RECTYPES
PRINT RECTYPE
END
-EXIT
0 NUMBER OF RECORDS IN TABLE= 0 LINES= 0
WF 7.6.6, FOCUS 7.6.4, IBM MVS/TSO, Windows 2003 Server, DB2, MSSQL