<?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: A Little Help With PHP VMS File Reads in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/a-little-help-with-php-vms-file-reads/m-p/5017416#M38407</link>
    <description>I never really found a solution to the problem, so did what every good programmer should do - ignored it till it went away :)&lt;BR /&gt;&lt;BR /&gt;Just joking of course.&lt;BR /&gt;&lt;BR /&gt;There are mutterings that future versions of PHP may have RMS support in them, but I may not be around long enough to see it.&lt;BR /&gt;&lt;BR /&gt;Rob.</description>
    <pubDate>Mon, 03 Sep 2007 10:28:33 GMT</pubDate>
    <dc:creator>Robert Atkinson</dc:creator>
    <dc:date>2007-09-03T10:28:33Z</dc:date>
    <item>
      <title>A Little Help With PHP VMS File Reads</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/a-little-help-with-php-vms-file-reads/m-p/5017407#M38398</link>
      <description>I'm trying to use PHP to read an index, fixed-length file.&lt;BR /&gt;&lt;BR /&gt;If I use file() I just get everything in index 0 of the array.&lt;BR /&gt;&lt;BR /&gt;If I use file_get_contents, there's nothing to show where one record ends and another begins. I'd have to hard-code the record length to read the file properly.&lt;BR /&gt;&lt;BR /&gt;fread() is the closest I get to processing the records, as it carries a LF through into the resultant data.&lt;BR /&gt;&lt;BR /&gt;When I try these out on variable length files, I get NULL, ETX (End Of Text), NULL between the records.&lt;BR /&gt;&lt;BR /&gt;Does anyone have any sample scripts, or can tell me the proper method of reading both fixed-length and variable length files by record?&lt;BR /&gt;&lt;BR /&gt;Thanks, Rob.</description>
      <pubDate>Thu, 07 Dec 2006 03:46:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/a-little-help-with-php-vms-file-reads/m-p/5017407#M38398</guid>
      <dc:creator>Robert Atkinson</dc:creator>
      <dc:date>2006-12-07T03:46:55Z</dc:date>
    </item>
    <item>
      <title>Re: A Little Help With PHP VMS File Reads</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/a-little-help-with-php-vms-file-reads/m-p/5017408#M38399</link>
      <description>What I don't know about PHP would fill its&lt;BR /&gt;manual, but I'd be pretty amazed if it had&lt;BR /&gt;the ability to deal well with any file format&lt;BR /&gt;other than sequential (with Stream_LF records&lt;BR /&gt;being the safest).&lt;BR /&gt;&lt;BR /&gt;I'd guess that you're just seeing the byte&lt;BR /&gt;stream, which is not what you'd want on the&lt;BR /&gt;more exotic file formats.&lt;BR /&gt;&lt;BR /&gt;Perhaps you could use the "system" function&lt;BR /&gt;to run a real (RMS-aware) program which could&lt;BR /&gt;do the I/O and pass the data back.</description>
      <pubDate>Thu, 07 Dec 2006 05:11:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/a-little-help-with-php-vms-file-reads/m-p/5017408#M38399</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2006-12-07T05:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: A Little Help With PHP VMS File Reads</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/a-little-help-with-php-vms-file-reads/m-p/5017409#M38400</link>
      <description>May be you can use ODBC for RMS because ODBC is supported by PHP.&lt;BR /&gt;&lt;BR /&gt;Wim (1 year and 7 days without PHP)</description>
      <pubDate>Thu, 07 Dec 2006 05:16:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/a-little-help-with-php-vms-file-reads/m-p/5017409#M38400</guid>
      <dc:creator>Wim Van den Wyngaert</dc:creator>
      <dc:date>2006-12-07T05:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: A Little Help With PHP VMS File Reads</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/a-little-help-with-php-vms-file-reads/m-p/5017410#M38401</link>
      <description>May be you can use ODBC for RMS because ODBC is supported by PHP.&lt;BR /&gt;&lt;BR /&gt;But I would go for the solution of Steven. You can even use DCL.&lt;BR /&gt;&lt;BR /&gt;Wim (1 year and 7 days without PHP)</description>
      <pubDate>Thu, 07 Dec 2006 05:17:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/a-little-help-with-php-vms-file-reads/m-p/5017410#M38401</guid>
      <dc:creator>Wim Van den Wyngaert</dc:creator>
      <dc:date>2006-12-07T05:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: A Little Help With PHP VMS File Reads</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/a-little-help-with-php-vms-file-reads/m-p/5017411#M38402</link>
      <description>We're talking about reading thousands of records, so DCL or running a shell command is not an option - that's why I'm trying to do this in PHP!&lt;BR /&gt;&lt;BR /&gt;If you can tell me where I can get a free VMS ODBC driver for RMS , I'd be happy to try that.&lt;BR /&gt;&lt;BR /&gt;Rob.</description>
      <pubDate>Thu, 07 Dec 2006 05:22:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/a-little-help-with-php-vms-file-reads/m-p/5017411#M38402</guid>
      <dc:creator>Robert Atkinson</dc:creator>
      <dc:date>2006-12-07T05:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: A Little Help With PHP VMS File Reads</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/a-little-help-with-php-vms-file-reads/m-p/5017412#M38403</link>
      <description>&lt;BR /&gt;&amp;gt;&amp;gt; I'm trying to use PHP to read an index, fixed-length file.&lt;BR /&gt;&lt;BR /&gt;I think you mean an "RMS Indexed file with fixed length records", not an index, not a fixed length file like you wrote. Correct?&lt;BR /&gt;To be sure can you post a reply with DIR/FULL output included or attached?&lt;BR /&gt;&lt;BR /&gt;RMS Indexed file _can_ contain just text, but in a pinch contain 'binary' data such that inserting arbetrary record seperators would be silly. No sequence would be safe, some just more likely to be safe. It would need a record size mechanisme or something. So slurping the file with file_get_contents should never work (imho) for variable length records. For fixed length records, as long as you can figure out, or just know, the record length the program knows how to interpret the buffer as multiple record-sizes chunks.&lt;BR /&gt;&lt;BR /&gt;The 'file' interface however promisses to return a record per aray element. I'm surprised to learn it does not. &lt;BR /&gt;&lt;BR /&gt;My guess is that it was (accidently) told that it should not make record boundaries visible. In RMS terms that would be record-attributes = NONE. Try changing that to indicate record boundaries are meaningfull by using: $ set file/attr=rat=cr ...&lt;BR /&gt;(to set back: $ set file/attr=rat=none ...)&lt;BR /&gt;&lt;BR /&gt;If I am right, and we are talking about rms indexed files, then going ODBC would be insane (just mho). Why build up a whole stack of relation access methods to get the plain data whne that data is plainly accessible on the box?! Call out to a simple C program calling RMS SYS$GET, SPAWN a task to convert the data to a stream_lf file, or use DCL to access indexed file records.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; We're talking about reading thousands of records, so DCL or running a shell command is not an option - that's why I'm trying to do this in PHP!&lt;BR /&gt;&lt;BR /&gt;Are you sure? Did you try? The RMS indexed file access code is thousands of instructions per record. A few hunderd more from DCL vs a few dozen more for a C program might not make that much difference. Adding an odcb layer (with client server architecture?) will add multipel thousands of instruction of overhead per record... probably much more than DCL. For simple read-read-read, DCL will do fine, and it can doe keyed reads as well. The main overhead it does is to call translate-logical on the stream name every time again.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; If you can tell me where I can get a free VMS ODBC driver for RMS , I'd be happy to try that.&lt;BR /&gt;&lt;BR /&gt;Try DCL first. It's free.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Hein van den Heuvel&lt;BR /&gt;HvdH Performance Consulting.&lt;BR /&gt;</description>
      <pubDate>Thu, 07 Dec 2006 06:52:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/a-little-help-with-php-vms-file-reads/m-p/5017412#M38403</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2006-12-07T06:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: A Little Help With PHP VMS File Reads</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/a-little-help-with-php-vms-file-reads/m-p/5017413#M38404</link>
      <description>It's often hard to supply the optimal&lt;BR /&gt;solution when the whole problem is not known,&lt;BR /&gt;but consider that it's possible to write a&lt;BR /&gt;C (or other language) program which can read&lt;BR /&gt;an RMS indexed file, do some work, and spew&lt;BR /&gt;HTML.  Such a program could do a good deal of&lt;BR /&gt;(potentially efficient) file I/O with only&lt;BR /&gt;one process creation.&lt;BR /&gt;&lt;BR /&gt;Many things are possible.</description>
      <pubDate>Thu, 07 Dec 2006 10:50:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/a-little-help-with-php-vms-file-reads/m-p/5017413#M38404</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2006-12-07T10:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: A Little Help With PHP VMS File Reads</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/a-little-help-with-php-vms-file-reads/m-p/5017414#M38405</link>
      <description>If you want to use a scripting language, you can try Python which has a interface for RMS indexed files.&lt;BR /&gt;There are 2 examples on &lt;A href="http://vmspython.dyndns.org/" target="_blank"&gt;http://vmspython.dyndns.org/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;JF</description>
      <pubDate>Thu, 07 Dec 2006 16:52:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/a-little-help-with-php-vms-file-reads/m-p/5017414#M38405</guid>
      <dc:creator>Jean-François Piéronne</dc:creator>
      <dc:date>2006-12-07T16:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: A Little Help With PHP VMS File Reads</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/a-little-help-with-php-vms-file-reads/m-p/5017415#M38406</link>
      <description>"running a shell command..." UNIX ALERT!&lt;BR /&gt;&lt;BR /&gt;A DCL command does not create another process. Some DCL commands like the OPEN/READ/WRITE/CLOSE do not even activate a program. Doing this type of file access in DCL is not that bad performancewise.&lt;BR /&gt;&lt;BR /&gt;/Guenther</description>
      <pubDate>Thu, 07 Dec 2006 17:52:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/a-little-help-with-php-vms-file-reads/m-p/5017415#M38406</guid>
      <dc:creator>GuentherF</dc:creator>
      <dc:date>2006-12-07T17:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: A Little Help With PHP VMS File Reads</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/a-little-help-with-php-vms-file-reads/m-p/5017416#M38407</link>
      <description>I never really found a solution to the problem, so did what every good programmer should do - ignored it till it went away :)&lt;BR /&gt;&lt;BR /&gt;Just joking of course.&lt;BR /&gt;&lt;BR /&gt;There are mutterings that future versions of PHP may have RMS support in them, but I may not be around long enough to see it.&lt;BR /&gt;&lt;BR /&gt;Rob.</description>
      <pubDate>Mon, 03 Sep 2007 10:28:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/a-little-help-with-php-vms-file-reads/m-p/5017416#M38407</guid>
      <dc:creator>Robert Atkinson</dc:creator>
      <dc:date>2007-09-03T10:28:33Z</dc:date>
    </item>
  </channel>
</rss>

