<?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: Reading locked files in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6851138#M37622</link>
    <description>&lt;P&gt;Don't know if this is too late, but check out RALF (Read a Locked File) at &lt;A href="http://www.tomwade.eu/software" target="_blank"&gt;www.tomwade.eu/software&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Apr 2016 12:40:31 GMT</pubDate>
    <dc:creator>Tom Wade_1</dc:creator>
    <dc:date>2016-04-16T12:40:31Z</dc:date>
    <item>
      <title>Reading locked files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6842829#M37605</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have locked files, I am looking for ways to read them via sys$open() and sys$read() using block IO. Is there any FAB flag that I must use to let this happen?&lt;/P&gt;&lt;P&gt;I have a test code which keeps the file locked using fcntl, read shared or exclusive. Now, if I try to open the same file from another application it fails with error '%RMS-E-FLK, file currently locked by another user'.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Manoj&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2016 22:10:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6842829#M37605</guid>
      <dc:creator>mpradhan</dc:creator>
      <dc:date>2016-03-17T22:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: Reading locked files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6842858#M37606</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have control over the code/program for the second user?&lt;/P&gt;&lt;P&gt;The first accessor may/will define what other can do through the FAB$M_SHR.&lt;/P&gt;&lt;P&gt;To allow other reader, specify FAB$V_SHRGET, to allow writers FAB$V_SHRUPD ( and/or PUT, DEL ... all the same really).&lt;/P&gt;&lt;P&gt;Now any subsequent opener must also approve of prior opens. &amp;nbsp;&lt;/P&gt;&lt;P&gt;So if yo specified a WRITE option in FAB$M_FAC, then the other SHR has to allow write otherwise they'll get that FLK error.&lt;/P&gt;&lt;P&gt;For BLOCKIO (readers0 I suspect you want look at using&amp;nbsp;FAB$V_UPI&lt;/P&gt;&lt;P&gt;Finally if you want to really blow through exclusive access, like BACK/IGNORE=INTERLOCK, then check out the IO Reference manual and look for&amp;nbsp;FIB$V_NOLOCK&amp;nbsp;&lt;/P&gt;&lt;P&gt;hth,&lt;/P&gt;&lt;P&gt;Hein&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2016 23:38:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6842858#M37606</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2016-03-17T23:38:56Z</dc:date>
    </item>
    <item>
      <title>Re: Reading locked files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6843037#M37607</link>
      <description>&lt;P&gt;No, I dont have access to the other program which might have locked the file, this could be an applicaiton writing to log files, etc.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried Block IO with V_UPI to no avail.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I cannot use BACKUP /IGNORE=INTERLOCK.&lt;/P&gt;&lt;P&gt;All my code is sys$open based and hence moving to sys$qiow would be quite a change to just acheive a read access to a locked file :(.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This part of my example code which is trying to open.&lt;/P&gt;&lt;P&gt;pFab-&amp;gt;fab$b_fac = FAB$M_BIO | FAB$M_GET; // block IO&lt;BR /&gt;pFab-&amp;gt;fab$l_xab = (char*)&amp;amp;xabsum;&lt;/P&gt;&lt;P&gt;pFab-&amp;gt;fab$b_shr |= FAB$V_SHRGET|FAB$V_SHRPUT|FAB$V_SHRDEL|FAB$V_SHRUPD|FAB$V_UPI;&lt;/P&gt;&lt;P&gt;status = sys$open(pFab);&lt;BR /&gt;if (!(status &amp;amp; 1)) {&lt;BR /&gt;cerr &amp;lt;&amp;lt; "sys$open(" &amp;lt;&amp;lt; _sFileName &amp;lt;&amp;lt; ") failed error=" &amp;lt;&amp;lt; status &amp;lt;&amp;lt; endl; &amp;lt;--- I Get the error here when other program has the file locked (see below for other program code).&lt;BR /&gt;return -1;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Program that's locking the file (this is an example code)&lt;/P&gt;&lt;P&gt;h = open( argv[1],O_RDWR, 0666, "shr=nql" );&lt;BR /&gt;if( h &amp;lt; 0 )&lt;BR /&gt;{&lt;BR /&gt;perror("failed open a file");&lt;BR /&gt;return 1;&lt;BR /&gt;}&lt;BR /&gt;printf( "opened..." );&lt;/P&gt;&lt;P&gt;lk.l_type =RDLCK;&lt;BR /&gt;lk.l_whence = SEEK_SET;&lt;BR /&gt;lk.l_start = 0;&lt;BR /&gt;lk.l_len = 0;&lt;/P&gt;&lt;P&gt;rc = fcntl( h, F_SETLK, &amp;amp;lk );&lt;BR /&gt;if( rc != 0 )&lt;BR /&gt;{&lt;BR /&gt;printf( "\n" );&lt;BR /&gt;perror( "fcntl failed" );&lt;BR /&gt;close(h);&lt;BR /&gt;return 1;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;printf( "file is locked.\n\nPress Enter to unlock..." );&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2016 14:57:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6843037#M37607</guid>
      <dc:creator>mpradhan</dc:creator>
      <dc:date>2016-03-18T14:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: Reading locked files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6843065#M37608</link>
      <description>&lt;P&gt;As I write in the first reply, if the first opener does not grant shared access then you are dead in the water.&lt;/P&gt;&lt;P&gt;The example shown does NOT grant access, for that to happen you need to add something like&amp;nbsp; "shr=nql,get"&lt;/P&gt;&lt;P&gt;Please note that NQL is a minor performance option and does NOT change the (FILE) locking behaviour at all. It only applies for RMS RECORD locks, and the C-RTL is not using record mode untill you tell it to (CTX=REC).&lt;/P&gt;&lt;P&gt;Suggestion: to check out what is happening use ANALYZE/SYSTEM ... SET PROC "proc with program running" ... SHOW PROC /RMS=(RAB,FAB)&lt;/P&gt;&lt;P&gt;I added a SLEEP to help with that.&lt;/P&gt;&lt;P&gt;Hein&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;#include  &amp;lt;unistd.h&amp;gt;
#include  &amp;lt;stdio.h&amp;gt;
#include  &amp;lt;sys/types.h&amp;gt;
#include  &amp;lt;unistd.h&amp;gt;
#include  &amp;lt;fcntl.h&amp;gt;
main(int argc, char **argv) {
  int h, rc;
  struct flock lk;
  h = open( argv[1],O_RDWR, 0666, "shr=nql,get" );
  if( h &amp;lt; 0 ) {
    perror("failed open a file");
    return 1;
  }
  printf( "opened..." );
  sleep(1000);

  lk.l_type =F_RDLCK;
  lk.l_whence = SEEK_SET;
  lk.l_start = 0;
  lk.l_len = 0;
 rc = fcntl( h, F_SETLK, &amp;amp;lk );
 if( rc != 0 ) {
    printf( "\n" );
    perror( "fcntl failed" );
   close(h);
   return 1;
  }
  printf( "file is locked.\n\nPress Enter to unlock..." );
}&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Mar 2016 15:28:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6843065#M37608</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2016-03-18T15:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: Reading locked files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6843154#M37609</link>
      <description>&lt;P&gt;&lt;STRONG&gt;"i&lt;/STRONG&gt;&lt;SPAN&gt;&lt;STRONG&gt;f the first opener does not grant shared access then you are dead in the water"&lt;/STRONG&gt;- holds true only if we are going sys$open() route, not if we are going sys$qio() route, correct?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;since I have no control over the other process, is sys$qio() my only programatic opton to be able to read locked files?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2016 18:25:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6843154#M37609</guid>
      <dc:creator>mpradhan</dc:creator>
      <dc:date>2016-03-18T18:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: Reading locked files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6843224#M37610</link>
      <description>&lt;P&gt;What's your goal? &amp;nbsp; Those locks are there to ensure data consistency and integrity, after all.&lt;/P&gt;&lt;P&gt;Override those and the "eavesdropping" application can get corrupt data.&lt;/P&gt;&lt;P&gt;This is basically the same as yanking out a copy of the data from underneath a running relational database.&amp;nbsp;&lt;/P&gt;&lt;P&gt;As for tools that do this, callable convert and callable backup are both available for generating the requested "data". &amp;nbsp; Yes, both CONVERT and BACKUP are also available as callable APIs.&lt;/P&gt;&lt;P&gt;Or use the C extensions to RMS, as was mentioned earlier.&lt;/P&gt;&lt;P&gt;As with most folks that have written their own "backup" tools and those that have experimented with such "fun" as the imfamous BACKUP /IGNORE=INTERLOCK, successful results of these sequences are far from certain. &amp;nbsp; Data can be cached, after all.&lt;/P&gt;&lt;P&gt;&lt;A href="http://labs.hoffmanlabs.com/node/1135" target="_blank"&gt;There are examples of more properly coordinating shared access around, too.&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2016 20:43:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6843224#M37610</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2016-03-18T20:43:16Z</dc:date>
    </item>
    <item>
      <title>Re: Reading locked files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6843239#M37611</link>
      <description>&lt;P&gt;my goal is to be able to read a locked file, no matter what sharing option the application (the one which currently has the lock) had while opening the file for reading. I am aware that this will be a blind read and will result in inconsistent data.&lt;/P&gt;&lt;P&gt;arent the examples (under hoffman labs) and fab$b_shr for the application which opened the file for writing, i.e. the writer (or the first application which opened the file) controls how the file is shared with subsequent applications?&lt;/P&gt;&lt;P&gt;I have experimented with fab$b_shr and no matter what I do, if the locking applicaiton already has a lock and has no sharing with others, then my read application always fails to open the file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If a swithc the code in reader application to use sys$qio instead, then I can open the file with V_NOLOCK.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2016 21:49:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6843239#M37611</guid>
      <dc:creator>mpradhan</dc:creator>
      <dc:date>2016-03-18T21:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: Reading locked files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6843272#M37612</link>
      <description>&lt;P&gt;The share SHR settings are how the first application&amp;nbsp;allows access to subsequent processes; how sharing is declared, and how the application tells RMS what can and should be cached in memory and what should be maintained on disk; how access should be coordinated. &amp;nbsp; That pointer to that example was an attempt to show you how to add options to the fopen call, given your stated requirement that RMS calls cannot be (directly) used.&lt;/P&gt;&lt;P&gt;Since you want inconsistent data, the switches you need here are&amp;nbsp;&lt;SPAN&gt;RAB$V_NLK and RAB$V_RRL. &amp;nbsp; Those disable locking and enable what's known as read regardless; you get whatever happens to be on disk at the time, though you should not expect to reliably&amp;nbsp;receive&amp;nbsp;errors or diagnostics even in the event of a locking-related collision.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Now to specify these settings on a fopen? &amp;nbsp;See the code example mentioned previously and see the help on the creat() function, and see the OpenVMS C documentation for creat() and fopen(), and see the RMS documentation for details on the switches. &amp;nbsp; If you're on a not-ancient OpenVMS version, use the following command to get an overview of the options available on creat() , and which include the NLK and RRL settings:&lt;/P&gt;&lt;P&gt;$ help crtl creat arguments&lt;/P&gt;&lt;P&gt;Between that and the C documentation, the names of the NLK and the RRL switches (and the assocated RMS documentation for RAB$V_NLK and RAB$V_RRL), and the previously-cited examples of OpenVMS C fopen calls, you should be able to access the requested potentially-corrupt data. &amp;nbsp;&lt;/P&gt;&lt;P&gt;Or if you're inclined to write somewhat less of your own code, just use &lt;A href="http://h71000.www7.hp.com/doc/84final/4493/4493pro_006.html#initiateconversion" target="_blank"&gt;callable convert (conv$convert)&lt;/A&gt; or &lt;A href="http://h71000.www7.hp.com/doc/84final/4493/4493pro_001.html#4493_bu_chap" target="_blank"&gt;callable BACKUP&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2016 23:44:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6843272#M37612</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2016-03-18T23:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: Reading locked files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6843313#M37613</link>
      <description>&lt;P&gt;&amp;nbsp;&amp;gt;&amp;gt;&amp;gt;&amp;nbsp;&lt;SPAN&gt; the switches you need here are&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;RAB$V_NLK and RAB$V_RRL. &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I call BS-squared. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- RAB options only play a role when you can get into the file. If the first opener choses to disallow that, like Hoff indicates himself, then that's irrelevant.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- NLK + RRL is inferior to, or with the right SET RMS equal to NQL, which is already requested. A seemingly reasonable but actually futile request.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;nbsp;Those disable locking and enable what's known as read regardless;. &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Yes and no. Mostly no. NLK and RRL both still request a record lock, so locking is no disabled. But for NLK the lock is converted to NL immediately upon getting it, and for RRL the record data is returned with a warning it was not locked upon NOT getting the lock.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now with SET RMS [/SYSTEM] /QUERY_LOCK=DISABLE the COMBINATION will indeed diable RECORD locking completely, but file locking stays in effect.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;As Manoj indicates, only QIO ACCESS + FIB$V_NOLOCK will blow through that if the process r image has.SYSPRV.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Manoj&amp;gt;&amp;gt; If a swithc the code in reader application to use sys$qio instead, then I can open the file with V_NOLOCK.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Correct.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hein.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Mar 2016 04:32:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6843313#M37613</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2016-03-19T04:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: Reading locked files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6843341#M37614</link>
      <description>&lt;P&gt;&lt;SPAN&gt;As Manoj indicates, only QIO ACCESS + FIB$V_NOLOCK will blow through that if the process r image has.SYSPRV.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Manoj&amp;gt;&amp;gt; If a swithc the code in reader application to use sys$qio instead, then I can open the file with V_NOLOCK.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Correct.&lt;/P&gt;&lt;P&gt;Hein.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;==================&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Be warned (as stated before). &amp;nbsp;This needs to be emphassized here.&lt;/P&gt;&lt;P&gt;Using this method will not cause a flush of the cache and may result in reading stale +/or incomplete data.&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Sat, 19 Mar 2016 10:53:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6843341#M37614</guid>
      <dc:creator>abrsvc</dc:creator>
      <dc:date>2016-03-19T10:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: Reading locked files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6843728#M37615</link>
      <description>&lt;P&gt;Guys - thanks, it's been quite a learning.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I feel, QIO is the routine, I would have to turn to, to be able to read (blind read) locked files, irrespecitve how the first application wished to share the file. This puts a great level of stress on my existing code base, which was using sys$open, sys$read etc so far.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any documentation/example you could point me to, to be able to read attributes via QIO and map them to XAB blocks (XABSUM, XABALL, XABFHC, FABITM, XABPRO)? I see IO$_ACCESS can fill a struct atrdef, but mapping those to XAB blocks seem very daunting. Looking for some guidelines here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Manoj&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2016 16:31:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6843728#M37615</guid>
      <dc:creator>mpradhan</dc:creator>
      <dc:date>2016-03-21T16:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: Reading locked files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6844340#M37616</link>
      <description>&lt;P&gt;Guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you know which library I'll be linking to if I use backup$start?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ CXXLINK/exe=test_lock.exe test_lock.obj&lt;/P&gt;&lt;P&gt;%ILINK-W-NUDFSYMS, 1 undefined symbol:&lt;/P&gt;&lt;P&gt;%ILINK-I-UDFSYM,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; unsigned int backup$start(_buf_arg *)&lt;/P&gt;&lt;P&gt;%ILINK-W-USEUNDEF, undefined symbol unsigned int backup$start(_buf_arg *) referenced&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; source code name: "backup$start(_buf_arg*)"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; section: .text&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; offset: %X0000000000001630&amp;nbsp; slot: 2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; module: TEST_LOCK&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2016 20:46:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6844340#M37616</guid>
      <dc:creator>mpradhan</dc:creator>
      <dc:date>2016-03-22T20:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: Reading locked files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6844528#M37617</link>
      <description>&lt;P&gt;&lt;SPAN&gt;BACKUPSHR &amp;nbsp;as to be expected. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I Checked using brute-force:&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ search sys$library:*.exe/win=0/log backup$start&lt;BR /&gt;:&lt;/P&gt;&lt;P&gt;%SEARCH-S-MATCHED, SYS$COMMON:[SYSLIB]BACKUPSHR.EXE;1 - 1338 records, 1 match&lt;/P&gt;&lt;P&gt;(Searches like that can fail if the string happens to fall over a 512 byte record boundary)&lt;/P&gt;&lt;P&gt;Hein.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2016 11:17:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6844528#M37617</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2016-03-23T11:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: Reading locked files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6848088#M37618</link>
      <description>&lt;P&gt;what's the correct way of linking this using CXXLINK?&lt;/P&gt;&lt;P&gt;The example I saw in&amp;nbsp;&lt;A href="http://h71000.www7.hp.com/doc/84final/4493/4493pro_002.html" target="_blank"&gt;http://h71000.www7.hp.com/doc/84final/4493/4493pro_002.html&lt;/A&gt; says "this is a VAX C program", does it still work on IA64?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 16:55:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6848088#M37618</guid>
      <dc:creator>mpradhan</dc:creator>
      <dc:date>2016-04-05T16:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: Reading locked files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6848212#M37619</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&amp;gt; what's the correct way of linking this using CXXLINK?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hmm, I'm not sure I have the right context: what is "this"? On the other hand, on I64 you don't need CXXLINK at all. CXXLINK (CXX aka C++)&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;is needed for linking C++ programs on Alpha (and maybe on VAX, I don't know for sure). CXXLINK is availbale on I64 just for convenience, for example if you use common command procedures/makefiles on Alpha and I64. On I64, just use LINK for C++ programs as well as other programs.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;gt; The example I saw in&amp;nbsp;&lt;A href="http://h71000.www7.hp.com/doc/84final/4493/4493pro_002.html" target="_blank" rel="nofollow"&gt;http://h71000.www7.hp.com/doc/84final/4493/4493pro_002.html&lt;/A&gt;&lt;SPAN&gt; says "this is a VAX C program", does it still work on IA64?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;I don't see a VAX C program on that page, I do see one on &lt;A href="http://h71000.www7.hp.com/doc/84final/4493/4493pro_001.html#bottom_001" target="_blank"&gt;http://h71000.www7.hp.com/doc/84final/4493/4493pro_001.html#bottom_001&lt;/A&gt;. I didn't try that. VAX C is an old C implementation. Your C compiler may still accept /STANDARD=VAXC. However, this is not recommended. Try the default for /STANDARD, which is a relaxed C89, and fix all the errors/warnings. No matter how you compile, you link with the LINK command.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Edit: On Alpha it goes like "this" (and it shouldn't be different on I64):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$ cre bck.c
/*&amp;nbsp;Example 3-1 Calling the Backup API with a VAX C Program */&lt;BR /&gt;...
^Z
$ cc/standard=relaxed bck
$ cre bck.opt
sys$share:backupshr/share
^Z
$ link bck,bck/opt&lt;BR /&gt;$&amp;nbsp;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2016 22:05:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6848212#M37619</guid>
      <dc:creator>H.Becker</dc:creator>
      <dc:date>2016-04-05T22:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: Reading locked files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6848561#M37620</link>
      <description>&lt;P&gt;thanks. That opt file was what I was missing and I was hoping the same (content of opt file) could be taken at command line.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 20:10:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6848561#M37620</guid>
      <dc:creator>mpradhan</dc:creator>
      <dc:date>2016-04-06T20:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: Reading locked files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6848609#M37621</link>
      <description>&lt;P&gt;On OpenVMS/Alpha V8.3, from HELP LINK:&lt;/P&gt;&lt;PRE&gt;Format

LINK file-spec [,...]&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;and from HELP LINK PARAMETER:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;file-spec [,...]&lt;BR /&gt;&lt;BR /&gt;   Specifies one or more input files (wildcard characters are not&lt;BR /&gt;   allowed). Input files may be object modules, shareable images,&lt;BR /&gt;   libraries to be searched for external references or from which&lt;BR /&gt;   specific modules are to be included, or options files to be read&lt;BR /&gt;   by the linker. ...&lt;/PRE&gt;&lt;P&gt;This is wrong. On the command line there can only be file-specs for object&amp;nbsp;modules, libraries or options. That is, you can have the usual file types&amp;nbsp;.obj, .olb and .opt. A shareable image file (.exe) is a linker input file, but you can not specify it as input on the command line.&lt;/P&gt;&lt;P&gt;However, there can be libraries with object modules and libraries with&amp;nbsp;shareable images. So you can create your own shareable image library&amp;nbsp;containing sys$share:backupshr.exe - essentially it contains the exported symbols of that&lt;BR /&gt;shareable image.&lt;/P&gt;&lt;PRE&gt;$ libr/cre/share bck.olb
$ libr/share bck.olb sys$share:backupshr&lt;/PRE&gt;&lt;P&gt;Then your link command is&lt;/P&gt;&lt;PRE&gt;$ link bck,bck/lib&lt;/PRE&gt;&lt;P&gt;And yes, you can delete the bck.olb after linking your main image:&amp;nbsp;it's not needed to run your program.&lt;/P&gt;&lt;P&gt;In an options file you can specify a shareable image as input file. If it comes to specify own or non-system default shareable images (others than in sys$share:imagelib.olb), almost&amp;nbsp;all VMS developers prefer using options files over shareable image libraries.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2016 23:29:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6848609#M37621</guid>
      <dc:creator>H.Becker</dc:creator>
      <dc:date>2016-04-06T23:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Reading locked files</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6851138#M37622</link>
      <description>&lt;P&gt;Don't know if this is too late, but check out RALF (Read a Locked File) at &lt;A href="http://www.tomwade.eu/software" target="_blank"&gt;www.tomwade.eu/software&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Apr 2016 12:40:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/reading-locked-files/m-p/6851138#M37622</guid>
      <dc:creator>Tom Wade_1</dc:creator>
      <dc:date>2016-04-16T12:40:31Z</dc:date>
    </item>
  </channel>
</rss>

