todsn loops if no delimiter on end of file

Discussion of the Co:Z Toolkit Dataset Pipes utilities
Post Reply
Jeno
Posts: 23
Joined: Wed Oct 03, 2007 5:28 am

todsn loops if no delimiter on end of file

Post by Jeno »

Hello, I've got the following, easy-to-reproduce problem:

printf "aaa\nbbb\nccc" | todsn -o 'space=(trk,1)' -l 0x15 //xxx.b.ttx
todsn(XXX.B.TTX)[E]: copyData: write error: EDC5065I A write system error was detected.

todsn(XXX.B.TTX)[N]: 11 bytes read; 11,402 records/34,203 bytes written in 0.014 seconds (785.714 Bytes/sec).

In fact, the dataset will be full,
IEC031I D37-04,IFG0554P,SSHD9,*OMVSEX,SYS00002,... repeating the last record:

Command ===>
********************************* Top of Data
aaa
bbb
ccc
ccc
ccc
ccc
ccc
......

---

Note that this problems seems to be related to the codepage and line-delimiter support as well.
I use LC_ALL=Hu_HU.IBM-1165.

Using "-l 0x15" fails for both codepages 1047 and 1165.
In 1047, ignoring -l or use "l nl" works correct, but the functionally identical "-l 0x15" fails.
In 1165, "-l nl" does not work, I must specify "-l 0x15", although 1165 is very similar to 1047 (except of some accented characters).

I am using z/OS 1.7, and todsn 1.0.0 2007-01-17

Hope you can reproduce this.
Best regards Jeno
nnanaa
Posts: 1
Joined: Thu Oct 04, 2007 10:22 pm
Contact:

Post by nnanaa »

During the fclose flow, the code uses
the file position to determine if there is more data to write. In the case where the file position is not valid,
fclose thinks there is more data to write and this results in
the message EDC5065I.
Jeno
Posts: 23
Joined: Wed Oct 03, 2007 5:28 am

Post by Jeno »

Sorry nnanaa, I do not see the relationship to fclose. I am afraid it is the read/write loop that fails the EOF. AFAIK the loop cannot come from close. Anyway, I would not expect any difference between "-l nl" and "-l 0x15".
coz
Posts: 391
Joined: Fri Jul 30, 2004 5:29 pm

Post by coz »

Jeno,

It looks like we have a problem with our line termination detection code. I'll try to work up a fix ASAP. In the meantime, I'd like to see some trace output, if possible. Could you issue your command again with the following trace argument:

Code: Select all

printf "aaa\nbbb\nccc" | todsn -L Translator=T -o 'space=(trk,1)' -l 0x15 //xxx.b.ttx 2>trace.out 
Since this will loop, you may want to terminate the program with a ctrl-c. I only need the first 100 lines or so of the output. Please send trace.out to info@dovetail.com.

Regards,
--Steve Goetze
coz
Posts: 391
Joined: Fri Jul 30, 2004 5:29 pm

Post by coz »

This problem has been fixed, and a new package is available at:

http://www.dovetail.com/downloads/dspipes/index.html

Thanks to Jeno for reporting this.
Post Reply