HP3000-L Archives

September 2000, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Paul H Christidis <[log in to unmask]>
Reply To:
Paul H Christidis <[log in to unmask]>
Date:
Wed, 20 Sep 2000 14:41:19 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (170 lines)
The following script should perform the requested task (the listf's were
included for verification):

file x=tmpcopy;temp
file x1=tmpcopy,oldtemp
listf !_thisfile,-2
listf !_thisfile,-3
setvar file_name    FINFO(_thisfile,"fullfname")
setvar file_account FINFO(_thisfile,"account")
setvar file_owner   FINFO(_thisfile,"owner")
fcopy from=!file_name;to=*x;new;subset=0,0
purge !file_name
fcopy from=*x;to=!file_name;new
altfile !file_name;owner=!file_owner;groupid=!file_account
purge *x1
listf !file_name,-2
listf !file_name,-3

It seems that FCOPY's default behaviour is to include ACDs.  The above
command file was executed against a file on my system with the results
shown below.

Regards
Paul Christidis


:clone
file x=tmpcopy;temp
file x1=tmpcopy,oldtemp
listf slp.db.vxl,-2
ACCOUNT=  VXL         GROUP=  DB

FILENAME        ------------ACD ENTRIES--------------

SLP                 MGR.NETBASE         : R,X


listf slp.db.vxl,-3
********************
FILE: SLP.DB.VXL

FILE CODE : 0                   FOPTIONS: ASCII,FIXED,NOCCTL,STD
BLK FACTOR: 47                  CREATOR : MGR.VXL
REC SIZE: 100(BYTES)            LOCKWORD:
BLK SIZE: 4700(BYTES)           SECURITY--READ    : ANY
EXT SIZE: 19(SECT)                        WRITE   : ANY
NUM REC: 45                               APPEND  : ANY
NUM SEC: 32                               LOCK    : ANY
NUM EXT: 1                                EXECUTE : ANY
MAX REC: 45                             **SECURITY IS ON
MAX EXT: 2                      FLAGS   : NO ACCESSORS
NUM LABELS: 0                   CREATED : WED, SEP 20, 2000,  2:03 PM
MAX LABELS: 0                   MODIFIED: WED, SEP 20, 2000,  2:03 PM
DISC DEV #: 44                  ACCESSED: WED, SEP 20, 2000,  2:03 PM
SEC OFFSET: 0                   LABEL ADDR: $000000F8.$00079520
VOLCLASS  : MPEXL_SYSTEM_VOLUME_SET:DISC

setvar file_name    FINFO(_thisfile,"fullfname")
setvar file_account FINFO(_thisfile,"account")
setvar file_owner   FINFO(_thisfile,"owner")

fcopy from=SLP.DB.VXL;to=*x;new;subset=0,0
HP31900A.05.02 FILE COPIER (C) HEWLETT-PACKARD CO. 1990

0 RECORDS PROCESSED *** 0 ERRORS

END OF SUBSYSTEM
purge SLP.DB.VXL
fcopy from=*x;to=SLP.DB.VXL;new
HP31900A.05.02 FILE COPIER (C) HEWLETT-PACKARD CO. 1990

*143*WARNING: FROMFILE IS EMPTY

0 RECORDS PROCESSED *** 0 ERRORS


END OF SUBSYSTEM
altfile SLP.DB.VXL;owner=MGR.VXL;groupid=VXL
purge *x1
listf SLP.DB.VXL,-2
ACCOUNT=  VXL         GROUP=  DB

FILENAME        ------------ACD ENTRIES--------------

SLP                 MGR.NETBASE         : R,X


listf SLP.DB.VXL,-3
********************
FILE: SLP.DB.VXL

FILE CODE : 0                   FOPTIONS: ASCII,FIXED,NOCCTL,STD
BLK FACTOR: 47                  CREATOR : MGR.VXL
REC SIZE: 100(BYTES)            LOCKWORD:
BLK SIZE: 4700(BYTES)           SECURITY--READ    : ANY
EXT SIZE: 19(SECT)                        WRITE   : ANY
NUM REC: 0                                APPEND  : ANY
NUM SEC: 0                                LOCK    : ANY
NUM EXT: 0                                EXECUTE : ANY
MAX REC: 45                             **SECURITY IS ON
MAX EXT: 2                      FLAGS   : NO ACCESSORS
NUM LABELS: 0                   CREATED : WED, SEP 20, 2000,  2:03 PM
MAX LABELS: 0                   MODIFIED: WED, SEP 20, 2000,  2:03 PM
DISC DEV #: 44                  ACCESSED: WED, SEP 20, 2000,  2:03 PM
SEC OFFSET: 0                   LABEL ADDR: $000000F8.$00079520
VOLCLASS  : MPEXL_SYSTEM_VOLUME_SET:DISC







Re:
> Perhaps I should elaborate on the requirements.
> Let us say the machine has crashed, and you
> have about 2000 message files in about 10 different accounts
> which are in a suspect state,
> and I want to rebuild them all as part of the system recovery process,
> before any applications have a chance to get tied up in knots with a bad
file.
> (today was a bad day :( )

So the one thing you *don't* want is something that copies
the file without looking at the data :)

> 2. Just erasing them with purge;save (is/has been)  good, but not always
> successful.
>    A file message file corruption is not necessarily cleared.

Wait...if you'd be happy with losing the data, then my recommendation
is to do precisely that: lose the data (and not risk copying from a
potentially damaged file).

I'd do:

   1) get file attributes
   2) purge the file
   3) build new file, with same attributes.

Of course, that's not trivial (particularly if you want to preserve ACDs)!

A script could be written that would do that, using FINFO to get most of
the data, and ALTSEC/COPYACD to copy the ACDs (if any)

Note: FINFO #5 will *NOT* tell you if a file has an ACD, but you
can do:

   build temp
   continue
   altsec temp;copyacd=origfile,filename
   if cierror = 7301 then
      ...no ACD
   else if cierror <> 0 then
      ...failed to copy ACD
      endif

7301 is:
   There is no ACD associated with the source file. (CIERR 7301)


> The above, and many other various symptoms have made it quite clear
> that after a system crash, message files must be purged and re-built.
> I believe the manuals on IPC strongly imply this as well.

That's my recommendation, too.

Stan Sieler                                           [log in to unmask]
www.allegro.com/sieler/wanted/index.html          www.allegro.com/sieler

ATOM RSS1 RSS2