Re: Reading in file containing Low Values doesn't work correctly



Timofmars@xxxxxxxxx wrote:
I'm trying to read in a line sequential file in my COBOL program on my
NT machine. The file is a db2 delimited export file, which is
basically a plain text file.

Two of the columns that are exported contain Low Values. I can verify
that they are low values in the exported data file by looking at the
hex values in an editor.

The data looks something like this:

123456~LL~L~ABCD

The tildes (~) are my delimiters. I'm representing the Low Lalues
with an (L). So this is 4 columns being exported, the first column
containing 123456, the next containing 2 low values characters, the
3rd containing 1 low value character, and the final column containing
ABCD.

The problem is that when I open then read the file into my COBOL
program, what it reads in looks like this:

123456~L~~ABCD

Why didn't it read all the low values? It didn't even replace them
with a space... It just ignored them as if they didn't exist.
Although it did manage to read one of the low value characters, but
not the other
2. Any idea what the problem is? I'm just reading the line into a PIC
X (8000) field. I animate the process and I'm able to see what it
reads in immediately after the read statement. I'm also absolutely
sure that I'm reading in the correct file, because any changes in
other data do show up in the animator.

Low-values doesn't really make sense in a LINE SEQUENTIAL file. I wouldn't
be surprised if the results were unpredictable.


.



Relevant Pages

  • Reading in file containing Low Values doesnt work correctly
    ... I'm trying to read in a line sequential file in my COBOL program on my ... containing 123456, the next containing 2 low values characters, the 3rd ... I'm just reading the line into a PIC X ... I animate the process and I'm able to see what it reads ...
    (comp.lang.cobol)
  • Re: Describing peoples
    ... The mountains rose abruptly from the plain. ... the line between cliff and plain. ... Christine shook her head, but then Diane pointed. ... and got the dialog (and, along with it, a sense of the characters). ...
    (rec.arts.sf.composition)
  • Re: Little C Help Please
    ... characters to read, so it hapily goes on reading even when the buffer ... represent the size of the buffer, and stops reading before that number ... I think the OP's problem was not a space in the input, but a newline ... Dig the even newer still, yet more improved, sig! ...
    (comp.os.linux.development.apps)
  • Re: Little C Help Please
    ... characters to read, so it hapily goes on reading even when the buffer ... represent the size of the buffer, and stops reading before that number ... I think the OP's problem was not a space in the input, but a newline ... Dig the even newer still, yet more improved, sig! ...
    (comp.unix.programmer)
  • Re: Whats the weirdest human language?
    ... you learn to match up combinations of two or more characters to recognize a word so that you can then pronounce it. ... He gets the meaning from context and doesn't give a fig what the pronunciation is. ... it becomes a logic puzzle that bears very little resemblance to reading. ... Japanese and Chinese people have both told me that they do this constantly while reading, and they can't understand why Westerners have such a problem reading words that they can't say. ...
    (talk.origins)