OT - swab and stuff -Re: xfer problems sco-sun
Brian K. White
brian at aljex.com
Thu Apr 1 22:36:06 PST 2004
Bill Vermillion wrote:
> On Thu, Apr 01, 2004 at 11:19:31PM -0500, J. P. Radley thus spoke:
>> Bill Vermillion propounded (on Thu, Apr 01, 2004 at 08:18:23PM
>> -0500):
>>> On Thu, Apr 01, 2004 at 03:35:18PM -0500, Brian K. White thus spoke:
>>>> Jay R. Ashworth wrote:
>>>>> On Thu, Apr 01, 2004 at 02:17:07PM -0500, Brian K. White wrote:
>>>>>> swapcpu? Just sounds like:
>>>>>> dd conv=swab if=in.txt of=out.txt
>>>
>>> And you said the 'swab' was SCO syntax, but not really. It's been
>>> around for years on others.
>>>
>>>>>
>>>>> *Ghod* no.
>>>
>>>>> You only have to swap the *record headers*, where there is binary
>>>>> data. Everything else is stored in ASCII; if you swap it, you'll
>>>>> trash the data.
>>>
>>>> Interesting, annoying too. Oh well, back to the original
>>>> problem which is that xfer should have worked.
>
>>> Just split the each record into two pieces, swap the heard, and add
>>> the rest. I did something similar a very long time ago before the
>>> xfer program existed. As I recall it's just the first 20 bytes
>>> that need to be swapped.
>
>> Would that it were that simple: it's the twenty byte header at the
>> beginning *of each record* that needs bytes swapped.
>
> It really os that simple. Even though I dind't have to swap the
> bytes I needed to convert out of a model III Profile into the new
> on on a model 16.
>
> There were no conversion tools available, but I took one from a
> Model II/12 that combined the 3 dat files to one file. And had a
> separate key.
>
> By taking what I did and changing it slightly it would be no
> problem.
>
> Since the III had key and data I left that part that way. I knew
> the length of the records. And the only tool I had - Xenix 1.?
> on a Radio Shack 6000 - was a BASIC interpreter.
>
> First step was to create 15,000 empty records so I could have the
> headers in the new version, and give me room to stuff in the data.
>
> After I created the 15,000 empty records then I just built a process
> that did random access between the key and data files I had
> created, and skipped in with a single statement executed one time
> to take me to the first data records, then it was just seek 20
> bytes, grab the next NN bytes from the key file I had, write the
> data, grab the required number of bytes to match the data, and
> write that, skip 20 bytes, and do it again.
>
> Swapping the bytes would even be simpler as it would be reading
> just one file and writing another.
>
> Read in 20 bytes, swap them, write to new file, read in the length
> of real data and write that, and get the next 20 bytes, swap them,
> and get the data.
>
> Random access file creation/access in BASIC is pretty simple.
Massively impractical to basically write my own xfer from scratch and get it
to the point that it's bug free enough to run completely automated in order
to process...
cd /u/appl/filepro
ls |wc -l
337
cd 3disp
ls |wc -l
2145
err why am I guessing...
find ./ ! -type d |wc -l
65517
...yeah, too many files & pieces to do anything manually, and times that by
3 since there are 3 copies of the whole tree for different companies not
counting the 4th copy for testing/training/development and of course they
have to be "almost 24/7" if the live switch-over takes more than a day a lot
of people scattered all over the country will each be failing to effectively
move a lot of truckloads around.
Not saying it's not doable, just saying xfer already exists and I can
automate it fairly easily and it would take me many many many hours to
duplicate it.
Brian K. White -- brian at aljex.com -- http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro BBx Linux SCO Prosper/FACTS AutoCAD #callahans Satriani
More information about the Filepro-list
mailing list