Re: Working with a tab-delimited input file

From: JerryMouse (nospam_at_bisusa.com)
Date: 11/04/03


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.



Relevant Pages

  • Re: Packet based baby monitor?
    ... still keep tabs on our little Alden. ... so that's only on our list if it won't jack the price much. ... we bought a second one when we needed a new one. ...
    (misc.kids)
  • Re: female 3.5mm to dual female RCA
    ... I remember the tabs getting too hot because the tabs were ... > of inappropriate preamp and defective soldering. ... case he has "The Jack" wired wrong. ...
    (sci.electronics.components)
  • Re: female 3.5mm to dual female RCA
    ... I remember the tabs getting too hot because the tabs were ... > of inappropriate preamp and defective soldering. ... case he has "The Jack" wired wrong. ...
    (sci.electronics.basics)
  • Disabling Display Properties to Users
    ... disable or remove tabs of the display properties so users ... could not jack the settings for the resolution thru the ...
    (microsoft.public.win2000.security)