[comp.os.vms] DCL programming and BACKUP journaling question

"Peter_A._Hwang.WBST147"@XEROX.COM (07/23/87)

Greetings to netlanders:

While implementing a comprehensive BACKUP system, I have some questions
that I hope someone on the network has answers:

1. DCL write/update does not work for me.
For a test case I created a file called j.1 which has two records:
22-JUL-1987
23-JUL-1987
I then open the file with:
$ open/share io j.1
Read the records:
$ read io rec1
$ read io rec2
Update rec2 with rec1:
$ write/update io rec1

At this point I got the error message:
%RMS-F-FAC, record operation not permitted by specified file access
(FAC).

The file is owned by me and the protection code is O:RWED. It is a
sequential file. This code is tested under VMS 4.5.
 
2. BACKUP journaling file corrupts easily
Over the last month alone I experienced several corrupt backup journal
files during daily and weekly incremental backup operations. The
corruption is detected only when I tried to list the journal file. The
typical error messages are:
%BACKUP-F-INVBJLSIZ, invalid record size in BACKUP journal
%BACKUP-F-INVBJLTYP, invalid record type in BACKUP journal

What is the cause of the invalid size or invalid record type ? Is there
any way to avoid them ? Any easy way to reconstruct the journaling file
?

Many thanks in advance.

Peter Hwang
Xerox Corp.

gwalker@SPCA.BBN.COM (Gail Rubin Walker) (07/23/87)

The answer to your problem with DCL and OPEN is by default, OPEN only opens
a file for READ. This is not related to file protection; the term "file
access" relates to how you opened the file. See HELP OPEN for all the info
you need on the various switches to OPEN; at a minimum you need to use the
/WRITE switch.

I don't have any real clues to your problem with the BACKUP journal files;
I haven't seen the problem myself though I'm not doing system management
these days. Is there more info you could provide? What command are you using
to list the BACKUP journal file? Does ANALYZE/RMS on the journal file give
you any information that may point to the problem? Does this happen
immediately after the journal file is created, or at some later time?

-- Gail Walker

carl@CITHEX.CALTECH.EDU (Carl J Lydick) (07/24/87)

 > 1. DCL write/update does not work for me.
 > For a test case I created a file called j.1 which has two records:
 > 22-JUL-1987
 > 23-JUL-1987
 > I then open the file with:
 > $ open/share io j.1
 > Read the records:
 > $ read io rec1
 > $ read io rec2
 > Update rec2 with rec1:
 > $ write/update io rec1

 > At this point I got the error message:
 > %RMS-F-FAC, record operation not permitted by specified file access
 > (FAC).

 > The file is owned by me and the protection code is O:RWED. It is a
 > sequential file. This code is tested under VMS 4.5.

You'd get the same message any time you try to write to the file, since
you've opened it readonly.  The /share says you'll let other people open
the file while you're reading it; it doesn't say you can write it.  You
need to use the command:
	$ OPEN/READ/WRITE io j.1