Re: Tab delimiter




"William M. Klein" <wmklein@xxxxxxxxxxxxxxxxx> wrote in message
news:yJF0h.70246$R52.55878@xxxxxxxxxxxxxxxxxxxxxxxxx
I found the following in the current LRM,

"2. The ORGANIZATION IS LINE SEQUENTIAL clause specifies that the logical
organization of the file is line sequential. The file organization is
determined at the creation of the file and cannot be changed later. The
records in a line sequential file are delimited by delimiters. Each record
can contain only printable characters and record delimiters. One record is
counted as one line."

that doesn't say what HAPPENS to "non-printable" characters, just that
they aren't supported. Later it says,

"1. When a READ statement has been executed for a line sequential file,
some record data may be transferred to the internal format. Refer to
"NetCOBOL User's Guide" for the transfer rules of record data."

and that lead me to the final answer (in the User Guide),

"If there are tab characters in an input record, spaces are inserted to
align the following characters to preset tab positions. The tab positions
are 1, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, and
72. If a tab is present at a character position beyond 72, it is read as a
single space."

I have never used it, but there is a reference to "High-Speed File
Processing" that includes a statement,

"4. If a record read from a line sequential file includes a tab, the tab
code is not replaced by a blank."



When in doubt, do not trust the documentation.

So, I tested the above theory and, indeed, Fijutsu COBOL does replace tabs
in input with blanks to force alignment at bytes/columns 8, 12, 16, etc.

The compiler does NOT change other unprintable characters (x'00' x'01'
x'255') to spaces, but does include them as characters for counting purposes
to get to the next tab position.


.



Relevant Pages

  • Re: Great SWT Program
    ... Vim -- car is fixed, ... and/or press tab again to get a list of choices. ... to type one or more additional characters and press tab again. ...
    (comp.lang.java.programmer)
  • Re: Decatenate a field with Make Table Query?
    ... You can probably do something similar in MS Word, lining them up using tab characters in ordinary paragraphs. ... You can use Word to delete lines that contain only white space, and you can delete repeated paragraph marks. ... I would define a special paragraph style that would include the tab settings for this operation, but would not save it in the global Word template, as you'll likely never need this style again, so leave "Add to Template" unchecked, but check "Automatically Update". ... In the Excel cell the paragraph marks show up as bangs; ...
    (microsoft.public.access.queries)
  • Re: Tabs vs. Spaces
    ... all displays were fixed character width. ... to align properly is if my display has the same tab spacing as yours. ... every 4 characters -- some oddballs even used three or five. ...
    (alt.comp.lang.learn.c-cpp)
  • Auto Tab
    ... automatic tab occurs when the last character permitted by ... The AutoTab property uses the following settings. ... You create an input mask for a control by using the ... of characters for each record. ...
    (microsoft.public.access.forms)
  • Re: Tab delimiter
    ... sequential file are delimited by delimiters. ... printable characters and record delimiters. ... "If there are tab characters in an input record, ... the following characters to preset tab positions. ...
    (comp.lang.cobol)