Operating System - OpenVMS
1753637 Members
5607 Online
108798 Solutions
New Discussion юеВ

DCL WRITE/SYMBOL Failing - Bug?

 
Robert Atkinson
Respected Contributor

DCL WRITE/SYMBOL Failing - Bug?

Here's a great one for you!

I have a set of routines (DCF) designed to handle files and records. The routines work fine across the system.

I've recently decided to take advantage of the 7.3-2 increased DCL limits and am writing a record of 500 bytes.

As you can see, the attempt to write a record fails. If I then close the file, re-open it and retry the write, it's sucessful.

I suspect this is an internal DCL/RMS bug, but I'd like your opinion.

If anyone's interested in the full code, drop me your email address to ratkinsonuk_at_tbs-ltd_dot_co_dot_uk.

$ !
$ OPEN /READ /WRITE /SHARE /ERROR=OPEN_MASTERFILE_ERROR OUTFILE DSK$EMAILDIST
...........
$ SH LOG OUTFILE*

(LNM$PROCESS_TABLE)

"OUTFILE" = "_$1$DGA100"

(LNM$JOB_811F26C0)

(LNM$GROUP_000250)

(LNM$SYSTEM_TABLE)

(LNM$SYSCLUSTER_TABLE)

(DECW$LOGICAL_NAMES)
$ WRITE /SYMBOL OUTFILE DCF$EMD_RECORD
%RMS-F-FAC, record operation not permitted by specified file access (FAC)
$ERROR:
$ DCF$ACTION == "TRUE"
$ !
$ VERIFY = 1
$ !
$ EXIT %X00004
%NONAME-F-NOMSG, Message number 00000004
GAMMA_ROB$$ CLOSE OUTFILE
GAMMA_ROB$$ OPEN /READ /WRITE /SHARE /ERROR=OPEN_MASTERFILE_ERROR OUTFILE DSK$EMAILDIST
GAMMA_ROB$$ WRITE /SYMBOL OUTFILE DCF$EMD_RECORD
GAMMA_ROB$$ CLOSE OUTFILE
3 REPLIES 3
Robert Atkinson
Respected Contributor

Re: DCL WRITE/SYMBOL Failing - Bug?

Ignore me (having a stupid day). I was opening the file twice, once read only and the write, hence the FAC error.

Rob.
Antoniov.
Honored Contributor

Re: DCL WRITE/SYMBOL Failing - Bug?

Robert,
"bad days" remembers me a song of REM.
Stop your work for a while and give your congratulation to some promote gurus in this forum.
Have a nice day!

Antonio Vigliotti
Antonio Maria Vigliotti
Karl Rohwedder
Honored Contributor

Re: DCL WRITE/SYMBOL Failing - Bug?

This leaves the question, why the procedure didn't proceed to the error label.

Note:
I normally add a CLOSE/NOLOG... before every OPEN, just in case.

regards Kalle