Re: Reading in file containing Low Values doesn't work correctly
- From: "pup" <sisyphus11@xxxxxxx>
- Date: 25 Jan 2007 13:50:49 -0800
DB2 is famous for placing LV in fields that are initialized but not
loaded. I have suggested to DBAs on mf that spaces be used for
initialization.
On mf I have requested that all report programs using columns from DB2
row have code
IF column LESS THAN SPACES
MOVE SPACES TO ofield
ELSE
MOVE COLUMN TO ofield
END-IF
If the file with LV is transmitted to some servers, the record/line is
truncated at the LV. Pita on reports being distributed.
On Jan 23, 2:26 pm, Timofm...@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.
.
- References:
- Reading in file containing Low Values doesn't work correctly
- From: Timofmars
- Reading in file containing Low Values doesn't work correctly
- Prev by Date: Re: OT: Newsgroup Name Change?
- Next by Date: Re: Reading in file containing Low Values doesn't work correctly
- Previous by thread: Re: Reading in file containing Low Values doesn't work correctly
- Next by thread: SORT and FILE STATUS
- Index(es):
Relevant Pages
|