- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: COBOL (STANDARD=V3) RRL+NLK -> NQL file status...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-20-2008 10:14 AM
тАО06-20-2008 10:14 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-20-2008 11:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-20-2008 12:30 PM
тАО06-20-2008 12:30 PM
Re: COBOL (STANDARD=V3) RRL+NLK -> NQL file status returned
Also... don't just believe it. Try it!
Note... OK_RLK is a little harder to get.
Sample run and program used below.
Hein.
$ set rms/query_lock=enable
$ mcr sys$Login:ok_rrl sys$login:y.idx
record 22,1
NQL ___ status = 10001
RRL ___ status = 18029
RRL NLK status = 18029
___ NLK status = 182AA
___ ___ status = 182AA
$ set rms/query_lock=disable
$ mcr sys$Login:ok_rrl sys$login:y.idx
record 22,1
NQL ___ status = 10001
RRL ___ status = 18029
RRL NLK status = 10001
___ NLK status = 182AA
___ ___ status = 182AA
$ type ok_rrl.c
#include
#include
#include
#define MAXRECSIZ 32767
int SYS$OPEN(), SYS$CONNECT(), SYS$GET(), SYS$REWIND();
main (int argc, char *argv[])
{
struct FAB fab;
struct RAB rab;
char recbuf[MAXRECSIZ+1];
int i, stat;
fab = cc$rms_fab;
rab = cc$rms_rab;
fab.fab$b_shr = FAB$M_MSE | FAB$M_UPD;
fab.fab$b_fac = FAB$M_GET | FAB$M_UPD;
fab.fab$l_fna = argv[1];
fab.fab$b_fns = strlen( argv[1] );
stat = SYS$OPEN ( &fab );
if (!(stat&1)) return stat;
rab.rab$l_fab = &fab;
rab.rab$l_ubf = recbuf;
rab.rab$w_usz = MAXRECSIZ;
stat = SYS$CONNECT ( &rab );
if (!(stat&1)) return stat;
stat = SYS$GET ( &rab ); // lock record
rab.rab$w_isi = 0; // new context
stat = SYS$CONNECT ( &rab );
rab.rab$v_nql = 1;
stat = SYS$GET ( &rab ); // no query lock first to get RFA for sure
printf ("record %d,%d\n", rab.rab$l_rfa0, rab.rab$w_rfa4);
printf ("NQL ___ status = %X\n", stat);
rab.rab$v_nql = 0;
rab.rab$v_rrl = 1;
SYS$REWIND( &rab );
stat = SYS$GET ( &rab );
printf ("RRL ___ status = %X\n", stat);
rab.rab$v_nlk = 1;
SYS$REWIND( &rab );
stat = SYS$GET ( &rab );
printf ("RRL NLK status = %X\n", stat);
rab.rab$v_rrl = 0;
SYS$REWIND( &rab );
stat = SYS$GET ( &rab );
printf ("___ NLK status = %X\n", stat);
rab.rab$v_nlk = 0;
SYS$REWIND( &rab );
stat = SYS$GET ( &rab ); // no options
printf ("___ ___ status = %X\n", stat);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-20-2008 12:43 PM
тАО06-20-2008 12:43 PM
Re: COBOL (STANDARD=V3) RRL+NLK -> NQL file status returned
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2008 05:26 AM
тАО06-24-2008 05:26 AM
Re: COBOL (STANDARD=V3) RRL+NLK -> NQL file status returned
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2008 08:00 AM
тАО06-24-2008 08:00 AM
Re: COBOL (STANDARD=V3) RRL+NLK -> NQL file status returned
Yes that is correct.
With NQL active RMS will only take out bucket locks (temporarely) to make sure it has an up-to-date copy of the block holding the data record.
There is NO record locking.
Typically this is ok.
Here is how I see it...
Let's say the process using NQL needs to display customer name and address on the screen. 'Obviously' it does not matter whether the current balance for that customer is being updated. IMHO it even does not really matter if the address is being updated.
Had the program asked a millisecond earlier, it would have had the (now) stale record in its buffer and displayed, possibly for a long time, while already no longer being up to date also.
No biggie.
Now if you are also about to update that balnce, then you had better lock it properly and read the actual value before updating!
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2008 09:13 AM
тАО06-24-2008 09:13 AM
Re: COBOL (STANDARD=V3) RRL+NLK -> NQL file status returned
I'm sorry if I'm being dense... but... how then would I lock it properly? I would have done a READ ALLOWING NO OTHERS (to lock it properly) then REWRITE to update the record.
Also, Applications' response to me:
"Well, his last sentence is the issue ├в once you turn this on system wide there appears to be no possible way to lock a record.
Or am I missing it?
At least no way in Cobol.
I hope he understood the question ├в we are not trying to lock the record so that someone doing a regardless-of-lock would be blocked. We want someone doing a allowing-no-others to block someone else doing a allowing-no-others."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2008 10:43 AM
тАО06-24-2008 10:43 AM
Re: COBOL (STANDARD=V3) RRL+NLK -> NQL file status returned
Just open for IO and READ.
>> I would have done a READ ALLOWING NO OTHERS (to lock it properly) then REWRITE to update the record.
Correct.
>> Also, Applications' response to me:
>> "Well, his last sentence is the issue ├Г┬в├В ├В once you turn this on system wide there appears to be no possible way to lock a record.
>> Or am I missing it?
They completely missed the fact that the RMS process/system flag is ONLY looked at when "READ REGARDLESS" is in effect.
There is ZERO, NO, ZILCH worry needed about loosing locking. You would only loose lock status information for processes which are not supposed to care too much... thye asked "READ REGARDLESS"
>> We want someone doing a allowing-no-others to block someone else doing a allowing-no-others."
NO impact.
Only impact is on the error status for RAAD REGARDLESS, which already blows through the allowin no others.
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-25-2008 04:57 AM
тАО06-25-2008 04:57 AM