Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!bellcore!texbell!killer!jolnet!dattier From: dattier@jolnet.ORPK.IL.US (David W. Tamkin) Newsgroups: comp.sys.cbm Subject: Re: Can REL files be copied? Summary: Geoffrey, that was the whole idea. Keywords: What did you expect? Message-ID: <474@jolnet.ORPK.IL.US> Date: 13 Apr 89 05:42:19 GMT References: <2030.2442CAD5@isishq.FIDONET.ORG> Reply-To: dattier@jolnet.ORPK.IL.US (David W. Tamkin) Organization: Jolnet Public Access Unix Lines: 37 Geoffrey Welsh wrote in <2030.2442CAD5@isishq.FIDONET.ORG> in comp.sys.cbm: | > From: dwtamkin@chinet.chi.il.us (David W. Tamkin) | > Message-ID: <8190@chinet.chi.il.us> | | > One difficulty in copying relative files is that EOI (st=64) is sent at the | > end of every record. The only way to know when to stop reading is an error | > 50 (record not present) from the source disk. The other is that BASIC's | > INPUT#, GET#, and PRINT# commands respectively untalk, untalk, and unlisten | > the addressed device when they are done, and unlistening or untalking a | > disk drive with an open relative file bumps the record pointer to the | > start of the next higher record. | | Sorry to say this, but that serves you right for doing this in BASIC. File | copying accross devices is slow enough without introducing the fun of a BASIC | interpreter. And, as you say, the BASIC commands do things you don't want | them to. That's always the risk when using a high-level language. Well, for those of you who saw this out of context, the bumping of the record pointer plus the slowness were two reasons I recommended against using BASIC. Welsh *did* understand that, but those of you who didn't see my article or who rely on smileys might need one after the "serves you right" observation. There might be other high-level languages that hold your hand without cutting off your circulation; when it comes to relative files, Commodore BASIC is not among them. (In BASIC 3.5 and higher, when you have fixed- length fields, the RECORD# command can undo the damage; however, the copy program would need to figure out the lengths of the fields [by measuring the strings so far from that record?], and that gets to be a major pain. A copy program should just grab a whole record without giving a hell what its contents mean to any application programs, as Welsh's example shows.) David W. Tamkin POB 567542 Norridge IL 60656-7542 | 8 Nisan 5749 dattier@jolnet.orpk.il.us Jolnet Public Access Unix | GEnie: D.W.TAMKIN ...!killer!jolnet!dattier Orland Park, Illinois | CIS: 73720,1570 Anyone on Jolnet who agrees with me is welcome to speak up on his or her own.