Re: Working with a tab-delimited input file
From: JerryMouse (nospam_at_bisusa.com)
Date: 11/04/03
- Next message: Thane Hubbell: "Re: need help with Norcom's GUIscreenio and Netexpress"
- Previous message: JerryMouse: "Re: Working with a tab-delimited input file"
- In reply to: Jack Sleight: "Re: Working with a tab-delimited input file"
- Next in thread: TofuTheGreat: "Re: Working with a tab-delimited input file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 3 Nov 2003 21:53:23 -0600
Jack Sleight wrote:
> Hi tofu,
>
> I assume the "optional" field you describe is really a field that
> sometimes contains data and sometimes doesn't and though the length of
> the file is variable, the number of fields for each record is fixed.
>
> If that's the case, Jerry Mouse's solution should work fine in all
> cases. Just define the "optional" field w/a length of the largest data
> string expected for the field (you'd do the same for all fields in the
> record.)
>
> When the UNSTRING stmt is executed and the "optional" field is
> encountered (i.e. the ",,"), and no data is xfered from the IP to the
> receiving field and it remains filled w/spaces, the initialized value.
>
> HTH, Jack.
Jack,
I think his I/O routine is killing the tabs and repositioning his data to
pre-defined tab positions. In other words, by the time he sees the data,
there are no tabs left. Realia COBOL had a file type like that, [T] as I
recall.
I never used it for the following reason. Consider a record with two fields,
tab delimited. Further, consider the tab stops to be every 5 characters. Now
pretend two records (+=TAB):
A+XYZ
ABCDEF+XYZ
In the first example, "XYZ" begins in byte 6. In the second example, "XYZ"
begins in byte 11. I could never figure out where the hell the data were, so
I never used the thing. As I understand it, tab-delimited fields were
designed to send data to PRINTERS that had built-in tabs, according to some
arbitrary standard dating back to the Sumerians.
- Next message: Thane Hubbell: "Re: need help with Norcom's GUIscreenio and Netexpress"
- Previous message: JerryMouse: "Re: Working with a tab-delimited input file"
- In reply to: Jack Sleight: "Re: Working with a tab-delimited input file"
- Next in thread: TofuTheGreat: "Re: Working with a tab-delimited input file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|