<?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: VMS BASIC program not writing out the last record in a file in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/vms-basic-program-not-writing-out-the-last-record-in-a-file/m-p/6221025#M37240</link>
    <description>&lt;P&gt;Hi as Hein says is this an RMS record or SQL or Stream file ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you move the mapped buffer to another in order to display it ?&amp;nbsp; Is the display a print statement ?&amp;nbsp; Especially on error handling.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does the program do a system call to the DCL error on end of file, is end of file status hard coded or do you use a library value for the error code ?&amp;nbsp; This is most important since it would explain interactive vs command procedure driven behavior.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please provide much more info about the file access, and error handling in the code; perhaps&amp;nbsp;code samples or mock up if necessary&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Without this it is not possible to answer your questions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Sun, 29 Sep 2013 22:06:33 GMT</pubDate>
    <dc:creator>Tom Wetty</dc:creator>
    <dc:date>2013-09-29T22:06:33Z</dc:date>
    <item>
      <title>VMS BASIC program not writing out the last record in a file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vms-basic-program-not-writing-out-the-last-record-in-a-file/m-p/6218273#M37237</link>
      <description>&lt;P&gt;I ran into a weird problem with a BASIC program where when the program is run manually it works fine. All records in the input file are accounted for in either good output or bypass/error files. But when the same program is run within a DCL script it is omitting the last record in the file. It doesn't get written to any of the output or error/bypass files.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I've run it into debug several times and it reads every record and outputs every record. I've tried all the obvious solutions so far - recompiling, etc, with no luck. Any ideas why this would be working manually but not within a script? &amp;nbsp;Is it possibly system-related?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2013 13:49:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vms-basic-program-not-writing-out-the-last-record-in-a-file/m-p/6218273#M37237</guid>
      <dc:creator>jme0909</dc:creator>
      <dc:date>2013-09-26T13:49:13Z</dc:date>
    </item>
    <item>
      <title>Re: VMS BASIC program not writing out the last record in a file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vms-basic-program-not-writing-out-the-last-record-in-a-file/m-p/6218873#M37238</link>
      <description />
      <pubDate>Thu, 26 Sep 2013 21:17:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vms-basic-program-not-writing-out-the-last-record-in-a-file/m-p/6218873#M37238</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2013-09-26T21:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: VMS BASIC program not writing out the last record in a file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vms-basic-program-not-writing-out-the-last-record-in-a-file/m-p/6220287#M37239</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; - recompiling,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hmm, you call is "&lt;/SPAN&gt;obvious solutions", I call it "&lt;SPAN&gt;Insanity" as per Einstein's defintion:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;'doing the same thing over and over again and expecting different results.'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;All records in the input file are accounted for in either good output or bypass/error files.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The is precious litle information to go on here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How is the input read? INPUT or GET statements?&lt;/P&gt;&lt;P&gt;Through &amp;nbsp;a process permanent file (file opened by DCL, for example SYS$INPUT)&lt;/P&gt;&lt;P&gt;What kinda inpu file? (If you don't understand the question, attach DIRECTORY/FULL output)&lt;/P&gt;&lt;P&gt;Is the last record special, for example for a stream-lf input file the last record sometimes does NOT have a formal terminator (Compare DUMP/BLOCK=START=... &amp;nbsp;with DUMP/RECORD=START=...)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Surely the program has a loop, which likely terminates on an EOF condition.&lt;/P&gt;&lt;P&gt;Does that last record trigger an EOF pre-maturely.&lt;/P&gt;&lt;P&gt;How about adding a simple record count + display after the loop.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How it the output written? PRINT? PUT? Regular 'OPEN'ed file? &amp;nbsp;Need a final CLOSE (or FLUSH) ?&lt;/P&gt;&lt;P&gt;Deferred write? Write-behind?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Show us some core code? OPEN, Loop, GET, eof-test, CLOSE?&lt;/P&gt;&lt;P&gt;Hein&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 28 Sep 2013 09:03:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vms-basic-program-not-writing-out-the-last-record-in-a-file/m-p/6220287#M37239</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2013-09-28T09:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: VMS BASIC program not writing out the last record in a file</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/vms-basic-program-not-writing-out-the-last-record-in-a-file/m-p/6221025#M37240</link>
      <description>&lt;P&gt;Hi as Hein says is this an RMS record or SQL or Stream file ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you move the mapped buffer to another in order to display it ?&amp;nbsp; Is the display a print statement ?&amp;nbsp; Especially on error handling.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does the program do a system call to the DCL error on end of file, is end of file status hard coded or do you use a library value for the error code ?&amp;nbsp; This is most important since it would explain interactive vs command procedure driven behavior.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please provide much more info about the file access, and error handling in the code; perhaps&amp;nbsp;code samples or mock up if necessary&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Without this it is not possible to answer your questions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 29 Sep 2013 22:06:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/vms-basic-program-not-writing-out-the-last-record-in-a-file/m-p/6221025#M37240</guid>
      <dc:creator>Tom Wetty</dc:creator>
      <dc:date>2013-09-29T22:06:33Z</dc:date>
    </item>
  </channel>
</rss>

