<?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: lib$find_file  on Pascal in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/lib-find-file-on-pascal/m-p/5125489#M25903</link>
    <description>This question is cross-posted in the comp.os.vms newsgroup under the same title.&lt;BR /&gt;&lt;BR /&gt;Over there I answerred:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; We are porting a Pascal app from a 32 bit VAX to a new Integrity Itanium Box. &lt;BR /&gt;:. &lt;BR /&gt;&amp;gt; We are using lib$find_file ( outfile, dummy, context, 'DATAFILE.' ); &lt;BR /&gt;&amp;gt;  The outfile is always recovered correct but sometimes dummy has an &lt;BR /&gt;&amp;gt; strange name &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I guess that worked on VAX, so it should be OK, but those names &lt;BR /&gt;selected are certainly 'odd' &lt;BR /&gt;&lt;BR /&gt;The first argument to find_file is in fact an INPUT specification... &lt;BR /&gt;called outfile? &lt;BR /&gt;The second argument is the output and typically the most important &lt;BR /&gt;part, but called dummy? &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;- Is the find_file return status being checked before using dummy? &lt;BR /&gt;You can only look into 'dummy' on succes. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;- How is the descriptor for 'dummy' set up? &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;- Is LIB$FIND_FILE_END used, like it should be? &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;It might be a 'tricky' memory corruption problem which was always &lt;BR /&gt;there, but never seen. &lt;BR /&gt;For example, the 'context' roughly corresponds with an RMS FAB. &lt;BR /&gt;If you manager to accidently flip the 'low' bit in the fap options &lt;BR /&gt;longword, then RMS will be told to work asynchroneously givign &lt;BR /&gt;surprise results... sometimes it 'seems' to works. Sometimes not. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This problem may require profession porting expertise.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Hein van den Heuvel&lt;BR /&gt;HvdH Performance Consulting&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 19 Aug 2008 14:41:24 GMT</pubDate>
    <dc:creator>Hein van den Heuvel</dc:creator>
    <dc:date>2008-08-19T14:41:24Z</dc:date>
    <item>
      <title>lib$find_file  on Pascal</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/lib-find-file-on-pascal/m-p/5125487#M25901</link>
      <description>We are porting a Pascal app from a 32 bit VAX to a new Integrity Itanium Box. We are compiling with ALIGN=VAX/ENUM=BYTE options and compilation run fine. However we have noticed that process that uses lib$find_file does not work as expected and did not recover filename as expected. We are using lib$find_file ( outfile, dummy, context, 'DATAFILE.' ); &lt;BR /&gt;The outfile is always recovered correct but sometimes dummy has an strange name (find_binary_file:Dummy = ␤121␤␤␤␤␤␤␤␤123ORT123␤␤␤␤␤␤d␤␤Rz␤␤␤␤␤␤␤␤0␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤␤ ␤{␤␤␤␤␤%␋♦&lt;BR /&gt; so the task fails. &lt;BR /&gt;Any help or any place I can find information related to this error?&lt;BR /&gt;</description>
      <pubDate>Tue, 19 Aug 2008 13:12:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/lib-find-file-on-pascal/m-p/5125487#M25901</guid>
      <dc:creator>R. Jimenez</dc:creator>
      <dc:date>2008-08-19T13:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: lib$find_file  on Pascal</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/lib-find-file-on-pascal/m-p/5125488#M25902</link>
      <description>Could you post the concerned source code (with declarations) ?&lt;BR /&gt;&lt;BR /&gt;Wim</description>
      <pubDate>Tue, 19 Aug 2008 14:32:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/lib-find-file-on-pascal/m-p/5125488#M25902</guid>
      <dc:creator>Wim Van den Wyngaert</dc:creator>
      <dc:date>2008-08-19T14:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: lib$find_file  on Pascal</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/lib-find-file-on-pascal/m-p/5125489#M25903</link>
      <description>This question is cross-posted in the comp.os.vms newsgroup under the same title.&lt;BR /&gt;&lt;BR /&gt;Over there I answerred:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; We are porting a Pascal app from a 32 bit VAX to a new Integrity Itanium Box. &lt;BR /&gt;:. &lt;BR /&gt;&amp;gt; We are using lib$find_file ( outfile, dummy, context, 'DATAFILE.' ); &lt;BR /&gt;&amp;gt;  The outfile is always recovered correct but sometimes dummy has an &lt;BR /&gt;&amp;gt; strange name &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I guess that worked on VAX, so it should be OK, but those names &lt;BR /&gt;selected are certainly 'odd' &lt;BR /&gt;&lt;BR /&gt;The first argument to find_file is in fact an INPUT specification... &lt;BR /&gt;called outfile? &lt;BR /&gt;The second argument is the output and typically the most important &lt;BR /&gt;part, but called dummy? &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;- Is the find_file return status being checked before using dummy? &lt;BR /&gt;You can only look into 'dummy' on succes. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;- How is the descriptor for 'dummy' set up? &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;- Is LIB$FIND_FILE_END used, like it should be? &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;It might be a 'tricky' memory corruption problem which was always &lt;BR /&gt;there, but never seen. &lt;BR /&gt;For example, the 'context' roughly corresponds with an RMS FAB. &lt;BR /&gt;If you manager to accidently flip the 'low' bit in the fap options &lt;BR /&gt;longword, then RMS will be told to work asynchroneously givign &lt;BR /&gt;surprise results... sometimes it 'seems' to works. Sometimes not. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This problem may require profession porting expertise.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Hein van den Heuvel&lt;BR /&gt;HvdH Performance Consulting&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 19 Aug 2008 14:41:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/lib-find-file-on-pascal/m-p/5125489#M25903</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2008-08-19T14:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: lib$find_file  on Pascal</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/lib-find-file-on-pascal/m-p/5125490#M25904</link>
      <description>I'm going to follow the thread in comp.os.vms.</description>
      <pubDate>Wed, 20 Aug 2008 06:10:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/lib-find-file-on-pascal/m-p/5125490#M25904</guid>
      <dc:creator>R. Jimenez</dc:creator>
      <dc:date>2008-08-20T06:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: lib$find_file  on Pascal</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/lib-find-file-on-pascal/m-p/5125491#M25905</link>
      <description>&lt;!--!*#--&gt;You didn't get enough information on how "dummy" is declared.  VARYING OF CHAR?  PACKED ARRAY OF CHAR?&lt;BR /&gt;&lt;BR /&gt;You also didn't say where you got the prototype of LIB$FIND_FILE from?  SYS$LIBRARY:PAS$LIB_ROUTINES?  Your private version?&lt;BR /&gt;&lt;BR /&gt;Here's an example that works:&lt;BR /&gt;&lt;BR /&gt;[inherit('sys$library:starlet',&lt;BR /&gt;         'sys$library:pascal$lib_routines')]&lt;BR /&gt;program find_file(input,output);&lt;BR /&gt;&lt;BR /&gt;var&lt;BR /&gt;    file_spec : varying [132] of char;&lt;BR /&gt;    result_spec : varying [132] of char;&lt;BR /&gt;    context : unsigned;&lt;BR /&gt;    ret_stat : unsigned;&lt;BR /&gt;&lt;BR /&gt;begin&lt;BR /&gt;context := 0;&lt;BR /&gt;&lt;BR /&gt;write('Enter filespec to parse: ');&lt;BR /&gt;while not eof do&lt;BR /&gt;        begin&lt;BR /&gt;&lt;BR /&gt;        { Read the filespec from the user }&lt;BR /&gt;        readln(file_spec);&lt;BR /&gt;&lt;BR /&gt;        { Loop and parse the file spec }&lt;BR /&gt;        repeat&lt;BR /&gt;&lt;BR /&gt;            { Parse it... }&lt;BR /&gt;            ret_stat := lib$find_file(&lt;BR /&gt;                file_spec,&lt;BR /&gt;                %descr result_spec, { Use %DESCR to get CLASS_VS }&lt;BR /&gt;                context);&lt;BR /&gt;&lt;BR /&gt;            if (not odd(ret_stat)) and&lt;BR /&gt;               (ret_stat &amp;lt;&amp;gt; RMS$_NMF) and&lt;BR /&gt;               (ret_stat &amp;lt;&amp;gt; RMS$_FNF)&lt;BR /&gt;            then&lt;BR /&gt;                lib$stop(ret_stat);&lt;BR /&gt;&lt;BR /&gt;            if (ret_stat &amp;lt;&amp;gt; RMS$_NMF) and&lt;BR /&gt;               (ret_stat &amp;lt;&amp;gt; RMS$_FNF)&lt;BR /&gt;            then&lt;BR /&gt;                writeln(result_spec);&lt;BR /&gt;&lt;BR /&gt;        until (ret_stat = RMS$_NMF) or (ret_stat = RMS$_FNF);&lt;BR /&gt;&lt;BR /&gt;        { Clear LIB$FIND_FILE context }&lt;BR /&gt;        lib$find_file_end(context);&lt;BR /&gt;&lt;BR /&gt;        { Get another file spec }&lt;BR /&gt;        write('Enter filespec to parse: ');&lt;BR /&gt;&lt;BR /&gt;        end;&lt;BR /&gt;end.&lt;BR /&gt;&lt;BR /&gt;Note the explicit use of %DESCR on the output argument for LIB$FIND_FILE.&lt;BR /&gt;&lt;BR /&gt;John</description>
      <pubDate>Wed, 20 Aug 2008 17:18:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/lib-find-file-on-pascal/m-p/5125491#M25905</guid>
      <dc:creator>John Reagan</dc:creator>
      <dc:date>2008-08-20T17:18:31Z</dc:date>
    </item>
  </channel>
</rss>

