Tony Prettyman
New Member
Outputting records in a table using a put statement. Sometimes when the job runs, the file will be corrupt. In today's case, a line is put out on the file, and the next line has much of the line before it, but not all of it.
record 1: 261885 BAILLIE GIFFORD & COMPANY Kave Sigaroudinia Calton Square, 1 Greenside Row UK Edinburgh EH1 3AN true B 0 false false kaaves@bailliegifford.com false
record 2: IE GIFFORD & COMPANY Kave Sigaroudinia Calton Square, 1 Greenside Row UK Edinburgh EH1 3AN true B 0 false false kaaves@bailliegifford.com false
Records are tab delimited using CHR(9). If I run the file again, the 2nd record doesn't appear, so it's like a hiccup or something. Not repeatable, which is why I would rule out bad data in the table.
here's what the code is doing:
output to file.
for each record no-lock:
put unformatted
field1 CHR(9)
field2 CHR(9)
etc.
field99 SKIP.
end.
output close.
record 1: 261885 BAILLIE GIFFORD & COMPANY Kave Sigaroudinia Calton Square, 1 Greenside Row UK Edinburgh EH1 3AN true B 0 false false kaaves@bailliegifford.com false
record 2: IE GIFFORD & COMPANY Kave Sigaroudinia Calton Square, 1 Greenside Row UK Edinburgh EH1 3AN true B 0 false false kaaves@bailliegifford.com false
Records are tab delimited using CHR(9). If I run the file again, the 2nd record doesn't appear, so it's like a hiccup or something. Not repeatable, which is why I would rule out bad data in the table.
here's what the code is doing:
output to file.
for each record no-lock:
put unformatted
field1 CHR(9)
field2 CHR(9)
etc.
field99 SKIP.
end.
output close.