Re: Tab delimiter
- From: "Richard" <riplin@xxxxxxxxxxxx>
- Date: 29 Oct 2006 12:33:18 -0800
Robin Lee wrote:
As an aside, Microfocus (or at least the Microsoft version of it) had a
(-N) runtime switch to suppress tab expansion,
That's not what it does. Well, not in any way that is useful. The 'N'
(Null) switch has been in Microfocus at least as far back as Level II
Cobol, as is the 'T' (Tab) switch.
But neither does quite what is normally meant by 'suppressing tab
expansion'.
When the Null switch is on (+N) on writing there will be a Null (x"00")
inserted before each hex character in the record less than x"1B". This
will make a tab into a x"00"x"09" pair. On reading these pairs will
not be expanded and the nulls will be stripped so that the record is as
it was when the WRITE was executed. It will still expand solo tabs.
When the Null switch is off (-N) there is no null insertion on writing
and tabs are expanded on reading.
If it is required to read 'tab separated' data from other programs then
it would be required to have the 'tab' preceeded in each case by a
null.
The Tab switch on causes writing to replace runs of spaces with a tab
character where appropriate. Tabs are expnaded on reading regardless of
this setting.
as well as a system call that
could be executed from within the program to do the same. In the long run,
I found these to be so awkward that I instead wrote an assembly language
routine to do the chore of reading sequential files. This proved to be
quite reliable, and also allowed accommodating other non-printable
characters, as well as files with non-DOS line terminations ... files from
other systems with other variation of textual data files.
I haven't had to deal with this yet in Fujitsu... it's good to know ahead of
time that there's no way to work around it, other than perhaps preprocessing
the input file, as my assembly skills aren't what they used to be.
You could call C routines. Just call fopen, fgets, fclose.
.
- Follow-Ups:
- Re: Tab delimiter
- From: Robin Lee
- Re: Tab delimiter
- References:
- Tab delimiter
- From: hmitchell
- Re: Tab delimiter
- From: Richard
- Re: Tab delimiter
- From: HeyBub
- Re: Tab delimiter
- From: Donald Tees
- Re: Tab delimiter
- From: Richard
- Re: Tab delimiter
- From: Robin Lee
- Tab delimiter
- Prev by Date: Re: Home based Internet research Jobs 7740
- Next by Date: Re: Examples of Web sites backed by COBOL
- Previous by thread: Re: Tab delimiter
- Next by thread: Re: Tab delimiter
- Index(es):
Relevant Pages
|