- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Record operation not allowed by (FAC)
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2009 09:28 AM
тАО12-22-2009 09:28 AM
Record operation not allowed by (FAC)
I am simply writing a string to a dat file (code excerpt)
$ OPEN/WRITE INFILE SIMPLE.DAT
$ WRITE INFILE STRING_VAR
$ CLOSE INFILE
This problem comes and goes; my permanent solution is:
$ OPEN/WRITE INFILE SIMPLE.DAT
$ CLOSE INFILE
$ OPEN/WRITE INFILE SIMPLE.DAT
$ WRITE INFILE STRING_VAR
$ CLOSE INFILE
What is causing this problem? There is nothing complex about my code. Is it a timing issue between the OPEN and WRITE?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2009 10:55 AM
тАО12-22-2009 10:55 AM
Re: Record operation not allowed by (FAC)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2009 11:04 AM
тАО12-22-2009 11:04 AM
Re: Record operation not allowed by (FAC)
As an amplification of Hoff's comment, it is not uncommon for a file to be left open, either because of a coding error or a command procedure that was aborted by CNTRL-Y.
This can be seen by doing a SHOW LOGICAL/PROCESS, the files will show up in the process logical name table.
The CLOSE can be done, or a more complex check using the F$TRNLNM lexical function can check for the presence of the logical name in the process logical name table (LNM$PROCESS).
- Bob Gezelter, http://www.rlgsc.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2009 11:21 AM
тАО12-22-2009 11:21 AM
Re: Record operation not allowed by (FAC)
NOTE: I am just now revisiting DCL after a 15-year absence.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2009 11:48 AM
тАО12-22-2009 11:48 AM
Re: Record operation not allowed by (FAC)
When programming with OPEN, the OPEN opens a file if not open, or uses an existing and opened file if previously opened and not closed and picks up where you left off.
Thus the result is that one OPEN case leaves you where you expect in the file, and the other doesn't.
CLOSE /NOLOG ensures that your code always follows through the expected I/O path.
Any OPEN. Read or write.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-22-2009 03:02 PM
тАО12-22-2009 03:02 PM
Re: Record operation not allowed by (FAC)
$ IF F$TRNLNM("INFILE").NES."" THEN CLOSE INFILE
at the end of a procedure (including the ^Y exit path) to make sure the file is always closed on exit. You could do the same prior to the OPEN if you're paranoid.
For debugging, try:
$ WRITE SYS$OUTPUT "INFILE=",F$TRNLNM("INFILE")
prior to the OPEN.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-23-2009 02:59 AM
тАО12-23-2009 02:59 AM
Re: Record operation not allowed by (FAC)
you will get the %RMS-F-FAC message on the WRITE INFILE STRING_VAR command, if the file INFILE is already open AND it has only been opened for READ (which is the default for OPEN INFILE SIMPLE.DAT) before.
So somewhere in your DCL procedure or in another DCL prcedure run in your process before, you seem to be opening INFILE for READ and forgot to close it.
Volker.