<?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: Relative record access from DCL in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/relative-record-access-from-dcl/m-p/4055682#M38256</link>
    <description>Sequential access to Relative files from DCL fully works.&lt;BR /&gt;&lt;BR /&gt;Random access to Relative files (and Fixed length sequential files) is documented NOT to work, but actually easily works for just about all key values.&lt;BR /&gt;That is all but about 1 in 255 values.&lt;BR /&gt;Why? Because any byte value of %x22 in the binary key is special and requires you to fudge the key to an unnatural length doublequoting the double-quote.&lt;BR /&gt;(It works 100% for less than 30 records, but only 97% for 34 records, 99.65% of the time for 290 record :-)&lt;BR /&gt;&lt;BR /&gt;$ conv/fdl="file; org rel; record; size 50; format fixed"/pad/trun tt: rel.tmp&lt;BR /&gt;aap&lt;BR /&gt;noot&lt;BR /&gt;mies&lt;BR /&gt;$ key="1234"  ! Reserve 4 bytes&lt;BR /&gt;$ open/read rel rel.tmp&lt;BR /&gt;$ key[0,32]=2&lt;BR /&gt;$ read/key=&amp;amp;key rel record&lt;BR /&gt;$ show symb record&lt;BR /&gt;  RECORD = "noot.............................................."&lt;BR /&gt;$ key[0,32]=5 ! Does not exist.&lt;BR /&gt;$ read/key=&amp;amp;key rel record&lt;BR /&gt;%RMS-E-RNF, record not found&lt;BR /&gt;$ close rel&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I have recently added a request to DCL/RMS to somehow give us binary key value access.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Enjoy,&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
    <pubDate>Thu, 16 Aug 2007 16:35:00 GMT</pubDate>
    <dc:creator>Hein van den Heuvel</dc:creator>
    <dc:date>2007-08-16T16:35:00Z</dc:date>
    <item>
      <title>Relative record access from DCL</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/relative-record-access-from-dcl/m-p/4055680#M38254</link>
      <description>In DCL, is it possible to access a specific record in an indexed file by RFA or record number, as opposed to reading every previous record sequentially?</description>
      <pubDate>Thu, 16 Aug 2007 14:48:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/relative-record-access-from-dcl/m-p/4055680#M38254</guid>
      <dc:creator>Stephen Eickhoff_1</dc:creator>
      <dc:date>2007-08-16T14:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Relative record access from DCL</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/relative-record-access-from-dcl/m-p/4055681#M38255</link>
      <description>DCL provides access into an RMS indexed file -- the title references "relative", and that's a different organization, though the text references indexed -- by record key, if that is what you mean.  &lt;BR /&gt;&lt;BR /&gt;This in addition to sequential access, or in combination with sequential access.  You can, for instance, locate a record by key and then process subsequent records sequentially.&lt;BR /&gt;&lt;BR /&gt;For details, look at the qualifiers /KEY and /INDEX and /MATCH available on the DCL command READ.&lt;BR /&gt;&lt;BR /&gt;RMS doesn't have a record number concept with indexed files.  (Though you could easily create and populate a key containing your own record number, and access records via that key directly.)&lt;BR /&gt;&lt;BR /&gt;There's no easy way I'm aware of to do an RFA-based record access from within DCL. &lt;BR /&gt;&lt;BR /&gt;Can't say I've ever tried to use a relative file strictly with DCL only (or know if anything other than sequential READ access works with a relative file); I generally go right to the indexed file organization for that task.&lt;BR /&gt;</description>
      <pubDate>Thu, 16 Aug 2007 15:23:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/relative-record-access-from-dcl/m-p/4055681#M38255</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2007-08-16T15:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: Relative record access from DCL</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/relative-record-access-from-dcl/m-p/4055682#M38256</link>
      <description>Sequential access to Relative files from DCL fully works.&lt;BR /&gt;&lt;BR /&gt;Random access to Relative files (and Fixed length sequential files) is documented NOT to work, but actually easily works for just about all key values.&lt;BR /&gt;That is all but about 1 in 255 values.&lt;BR /&gt;Why? Because any byte value of %x22 in the binary key is special and requires you to fudge the key to an unnatural length doublequoting the double-quote.&lt;BR /&gt;(It works 100% for less than 30 records, but only 97% for 34 records, 99.65% of the time for 290 record :-)&lt;BR /&gt;&lt;BR /&gt;$ conv/fdl="file; org rel; record; size 50; format fixed"/pad/trun tt: rel.tmp&lt;BR /&gt;aap&lt;BR /&gt;noot&lt;BR /&gt;mies&lt;BR /&gt;$ key="1234"  ! Reserve 4 bytes&lt;BR /&gt;$ open/read rel rel.tmp&lt;BR /&gt;$ key[0,32]=2&lt;BR /&gt;$ read/key=&amp;amp;key rel record&lt;BR /&gt;$ show symb record&lt;BR /&gt;  RECORD = "noot.............................................."&lt;BR /&gt;$ key[0,32]=5 ! Does not exist.&lt;BR /&gt;$ read/key=&amp;amp;key rel record&lt;BR /&gt;%RMS-E-RNF, record not found&lt;BR /&gt;$ close rel&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I have recently added a request to DCL/RMS to somehow give us binary key value access.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Enjoy,&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Thu, 16 Aug 2007 16:35:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/relative-record-access-from-dcl/m-p/4055682#M38256</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2007-08-16T16:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Relative record access from DCL</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/relative-record-access-from-dcl/m-p/4055683#M38257</link>
      <description>And here is a proof you can get to all records:&lt;BR /&gt;&lt;BR /&gt;$ perl -le "print for 1001..1050" &amp;gt; tmp.seq&lt;BR /&gt;$ conv/fdl="file; org rel; record; size 50; format fixed"/pad/trun tmp.seq tmp.rel&lt;BR /&gt;$ open rel tmp.rel&lt;BR /&gt;$ key="1234"&lt;BR /&gt;$ key[0,32]=33&lt;BR /&gt;$  read/key=&amp;amp;key rel record&lt;BR /&gt;$ show symb record&lt;BR /&gt;  RECORD = "1033.............................................."&lt;BR /&gt;$ read rel record&lt;BR /&gt;$ show symb record&lt;BR /&gt;  RECORD = "1034.............................................."&lt;BR /&gt;$ key[0,32]=34&lt;BR /&gt;$  read/key=&amp;amp;key rel record&lt;BR /&gt;%RMS-F-KSZ, invalid key size for $GET/$FIND&lt;BR /&gt;$ show symb key&lt;BR /&gt;  KEY = ""..."&lt;BR /&gt;$ key[00,24]=%x222222&lt;BR /&gt;$ key[24,24]=0&lt;BR /&gt;$ show symb key&lt;BR /&gt;  KEY = """"..."&lt;BR /&gt;$  read/key=&amp;amp;key rel record&lt;BR /&gt;$  show symb record&lt;BR /&gt;  RECORD = "1034.............................................."&lt;BR /&gt;&lt;BR /&gt;Not pretty huh?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Here is a proof that for example DELETE works for relative files:&lt;BR /&gt;&lt;BR /&gt;$ open/read/write rel tmp.rel&lt;BR /&gt;$ read/DELETE/key=&amp;amp;key rel record&lt;BR /&gt;$ $ key[0,32]=1&lt;BR /&gt;$ read/key=&amp;amp;key rel record&lt;BR /&gt;$ show sym record&lt;BR /&gt;  RECORD = "1001.............................................."&lt;BR /&gt;$ read rel record&lt;BR /&gt;$ show sym record&lt;BR /&gt;  RECORD = "1002.............................................."&lt;BR /&gt;$ read rel record&lt;BR /&gt;$ show sym record&lt;BR /&gt;  RECORD = "1004.............................................."&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Finally, the big difference between relative files and indexed files with a record number as key is that for indexed files the record number must be part of teh record. For relative files is it a magic number on the side which does not exist. In fact when you convert a relative file with convert the records are re-numbered! That makes changing bucket sizes for relative tricky.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hein&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 16 Aug 2007 16:48:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/relative-record-access-from-dcl/m-p/4055683#M38257</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2007-08-16T16:48:34Z</dc:date>
    </item>
  </channel>
</rss>

