Focal Point
How to prevent empty fields to be display

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4521058331

April 19, 2005, 12:36 PM
<Stahl>
How to prevent empty fields to be display
Dear all,
I have a flat file like this:
number | Field1 | Field2 | Field3 | Field4
----------------------------------------------
1234 | f10 | f20 | |
4567 | f11 | f21 | f31 | f41
9999 | f12 | f22 | f23 |

and I want to display a report like this:

1234 f10
1234 f20
4567 f11
4567 f21
4567 f31
4567 f41
9999 f12
9999 f22
9999 f23
Can anybody give me advice how to code this?
Thanks!
Sonni
April 19, 2005, 12:55 PM
HÃ¥kan
Here's the data:

1234f10f20
4567f11f21f31f41
9999f12f22f23

Here's the master:

FILENAME=FP, SUFFIX=FIX
SEGNAME=ROOT
FIELD=NUM,,A4,A4,$
SEGNAME=SECOND, OCCURS=VARIABLE
FIELD=CODE,,A3,A3,$

and here's the program:

FILEDEF fp DISK /wf_dev/ibi/apps/lidholh/fp.txt

TABLE FILE FP
PRINT NUM CODE
END

which will give you what you want