<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Record operation not allowed by (FAC) in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/record-operation-not-allowed-by-fac/m-p/4554351#M17737</link>
    <description>James,&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;This can be seen by doing a SHOW LOGICAL/PROCESS, the files will show up in the process logical name table.&lt;BR /&gt;&lt;BR /&gt;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).&lt;BR /&gt;&lt;BR /&gt;- Bob Gezelter, &lt;A href="http://www.rlgsc.com" target="_blank"&gt;http://www.rlgsc.com&lt;/A&gt;</description>
    <pubDate>Tue, 22 Dec 2009 19:04:13 GMT</pubDate>
    <dc:creator>Robert Gezelter</dc:creator>
    <dc:date>2009-12-22T19:04:13Z</dc:date>
    <item>
      <title>Record operation not allowed by (FAC)</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/record-operation-not-allowed-by-fac/m-p/4554349#M17735</link>
      <description>This is becoming a nagging problem.&lt;BR /&gt;&lt;BR /&gt;I am simply writing a string to a dat file (code excerpt)&lt;BR /&gt;&lt;BR /&gt;$  OPEN/WRITE INFILE SIMPLE.DAT&lt;BR /&gt;$  WRITE INFILE STRING_VAR&lt;BR /&gt;$  CLOSE INFILE&lt;BR /&gt;&lt;BR /&gt;This problem comes and goes; my permanent solution is:&lt;BR /&gt;&lt;BR /&gt;$  OPEN/WRITE INFILE SIMPLE.DAT&lt;BR /&gt;$  CLOSE INFILE&lt;BR /&gt;&lt;BR /&gt;$  OPEN/WRITE INFILE SIMPLE.DAT&lt;BR /&gt;$  WRITE INFILE STRING_VAR&lt;BR /&gt;$  CLOSE INFILE&lt;BR /&gt;&lt;BR /&gt;What is causing this problem?  There is nothing complex about my code.  Is it a timing issue between the OPEN and WRITE?</description>
      <pubDate>Tue, 22 Dec 2009 17:28:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/record-operation-not-allowed-by-fac/m-p/4554349#M17735</guid>
      <dc:creator>James A. Hilley</dc:creator>
      <dc:date>2009-12-22T17:28:06Z</dc:date>
    </item>
    <item>
      <title>Re: Record operation not allowed by (FAC)</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/record-operation-not-allowed-by-fac/m-p/4554350#M17736</link>
      <description>Always issue a CLOSE /NOLOG INFILE prior to an OPEN [/switches] INFILE [file] command.</description>
      <pubDate>Tue, 22 Dec 2009 18:55:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/record-operation-not-allowed-by-fac/m-p/4554350#M17736</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-12-22T18:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: Record operation not allowed by (FAC)</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/record-operation-not-allowed-by-fac/m-p/4554351#M17737</link>
      <description>James,&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;This can be seen by doing a SHOW LOGICAL/PROCESS, the files will show up in the process logical name table.&lt;BR /&gt;&lt;BR /&gt;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).&lt;BR /&gt;&lt;BR /&gt;- Bob Gezelter, &lt;A href="http://www.rlgsc.com" target="_blank"&gt;http://www.rlgsc.com&lt;/A&gt;</description>
      <pubDate>Tue, 22 Dec 2009 19:04:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/record-operation-not-allowed-by-fac/m-p/4554351#M17737</guid>
      <dc:creator>Robert Gezelter</dc:creator>
      <dc:date>2009-12-22T19:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: Record operation not allowed by (FAC)</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/record-operation-not-allowed-by-fac/m-p/4554352#M17738</link>
      <description>Is this only a problem with a WRITE?  Do I need to CLOSE/NOLOG INFILE before all OPENS, whether they be READ or WRITE?&lt;BR /&gt;&lt;BR /&gt;NOTE:  I am just now revisiting DCL after a 15-year absence.</description>
      <pubDate>Tue, 22 Dec 2009 19:21:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/record-operation-not-allowed-by-fac/m-p/4554352#M17738</guid>
      <dc:creator>James A. Hilley</dc:creator>
      <dc:date>2009-12-22T19:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: Record operation not allowed by (FAC)</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/record-operation-not-allowed-by-fac/m-p/4554353#M17739</link>
      <description>Using CLOSE /NOLOG prior to any OPEN is defensive DCL.&lt;BR /&gt;&lt;BR /&gt;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.  &lt;BR /&gt;&lt;BR /&gt;Thus the result is that one OPEN case leaves you where you expect in the file, and the other doesn't.  &lt;BR /&gt;&lt;BR /&gt;CLOSE /NOLOG ensures that your code always follows through the expected I/O path.&lt;BR /&gt;&lt;BR /&gt;Any OPEN.  Read or write.&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Dec 2009 19:48:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/record-operation-not-allowed-by-fac/m-p/4554353#M17739</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-12-22T19:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: Record operation not allowed by (FAC)</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/record-operation-not-allowed-by-fac/m-p/4554354#M17740</link>
      <description>I prefer:&lt;BR /&gt;&lt;BR /&gt;$ IF F$TRNLNM("INFILE").NES."" THEN CLOSE INFILE&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;For debugging, try:&lt;BR /&gt;&lt;BR /&gt;$ WRITE SYS$OUTPUT "INFILE=",F$TRNLNM("INFILE")&lt;BR /&gt;&lt;BR /&gt;prior to the OPEN.</description>
      <pubDate>Tue, 22 Dec 2009 23:02:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/record-operation-not-allowed-by-fac/m-p/4554354#M17740</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2009-12-22T23:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: Record operation not allowed by (FAC)</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/record-operation-not-allowed-by-fac/m-p/4554355#M17741</link>
      <description>James,&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;Volker.&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Dec 2009 10:59:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/record-operation-not-allowed-by-fac/m-p/4554355#M17741</guid>
      <dc:creator>Volker Halle</dc:creator>
      <dc:date>2009-12-23T10:59:48Z</dc:date>
    </item>
  </channel>
</rss>

