Subject: | |
From: | |
Reply To: | |
Date: | Wed, 20 Sep 2000 11:20:10 -0700 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
on 9/20/00 10:56 AM, Glenn Koster at [log in to unmask] wrote:
> Tad asked...
>
>> Would anyone know of a utility/easy-method which will
>> allow you to build a clone of an existing file (esp message files)
>> but without touching the data ?
>
> Take your choice... the COPY command or FCOPY both work. However, there is
> a catch for message files. You have to reference them by way of a file
> statement that has the key word "COPY" attached.
>
> So, if you had a file named "gjkfile" with 2 records in it and you wanted to
> create a new one preserving the data, here's what you would do...
>
> :FILE I=GJKFILE;COPY
> :COPY *I,NEWFILE
> :
>
> It's that simple.
>
> Glenn Koster
> Quintessential School Systems
With the fcopy you need to do the file equation, with the copy command you
can be lazy and skip it.
-Lane
-------------
PUB.IDS[1]:build lrmsg;msg
PUB.IDS[3]:fcopy from=doe.h;to=lrmsg
HP31900A.05.02 FILE COPIER (C) HEWLETT-PACKARD CO. 1990
*200*WARNING: FROMFILE RECSIZE IS 80 BYTES, TOFILE RECSIZE IS 128 WORDS.
CONTINUE OPERATION (Y OR N) ?y
*201*WARNING: FROMFILE IS ASCII, TOFILE IS BINARY
CONTINUE OPERATION (Y OR N) ?y
EOF FOUND IN FROMFILE AFTER RECORD 262
263 RECORDS PROCESSED *** 0 ERRORS
END OF SUBSYSTEM
PUB.IDS[4]:listf lrmsg,2
ACCOUNT= IDS GROUP= PUB
FILENAME CODE ------------LOGICAL RECORD----------- ----SPACE----
SIZE TYP EOF LIMIT R/B SECTORS #X MX
LRMSG 128W VBM 263 1031 1 512 2 *
PUB.IDS[5]:copy lrmsg,lrmsg2\
PUB.IDS[6]:listf lrmsg@,2
ACCOUNT= IDS GROUP= PUB
FILENAME CODE ------------LOGICAL RECORD----------- ----SPACE----
SIZE TYP EOF LIMIT R/B SECTORS #X MX
LRMSG 128W VBM 263 1031 1 512 2 *
LRMSG2 128W VBM 263 1031 1 512 1 *
|
|
|