Skip to main content

UNLOCK Statement

UNLOCK Statement


Purpose:

To release locks that have been applied to an opened file. This is used in a multi-device environment, often referred to as a network or network environment.

Syntax:

UNLOCK [#]n [,[record number] [TO record number]]

Comments:

n is the number that was assigned the file as it was originally numbered in the program.

record number is the number of the individual record that is to be unlocked. Or, if a range of records are to be unlocked, record number designates the beginning and ending record of the specified range.

The range of legal record numbers is 1 to 232-1. The limit on record size is 32767 bytes.

The record range specified must be from lower to (the same or) higher record numbers.

If a starting record number is not specified, the record number 1 is assumed.

If an ending record number is not specified, then only the specified record is unlocked.

The following are legal UNLOCK statements:

UNLOCK #nunlocks the entire file n
UNLOCK #n, Xunlocks record X only
UNLOCK #n, TO Yunlocks records 1 through Y
UNLOCK #n, X TO Yunlocks records X through Y

The locked file or record range should be unlocked before the file is closed.

Failure to execute the UNLOCK statement can jeopardize future access to that file in a network environment.

In the case of files opened in random mode, if a range of record numbers is specified, this range must match exactly the record number range given in the LOCK statement.

The "Permission denied" message will appear if a syntactically correct UNLOCK request cannot be granted. The UNLOCK statement must match exactly the paired LOCK statement.

It is expected that the time in which files or regions within files are locked will be short, and thus the suggested usage of the LOCK statement is within shortterm paired LOCK/UNLOCK statements.

Examples:

The following demonstrates how the LOCK/UNLOCK statements should be used:

LOCK #1, 1 TO 4
LOCK #1, 5 TO 8
UNLOCK #1, 1 TO 4
UNLOCK #1, 5 TO 8

The following example is illegal:

LOCK #1, 1 TO 4
LOCK #1, 5 TO 8
UNLOCK #1, 1 TO 8

Comments

Popular posts from this blog

Sky Rusher Mod Apk V1.4

Selamat Datang kapal untuk pesawat ruang angkasa Anda! Hindari rintangan dan pergi sejauh yang Anda bisa dalam terowongan highspeed. Apakah kamu siap ? Screenshoot Gameplay Information Name : Sky Rusher File : Apk Size : 40 MB Tags : Arkade Link Download Sky Rusher V1.4 Apk : Download   Mirror Link Apk : Download

Top 4 Best Email Marketing Tools to build your blog Audience

You can either make one time sales, or you can accumulate wealth, wealth disguised as Emails, and keep making money forever, your choice.  If you passed your 5th grade in one go, I'd say you're smart enough to go with option #2. Well, that's a good choice. But people won't just give you their E-mails, right? You need to have a system in place, to scrape it off of them, without pissing them off, so that they actually pay attention to your Emails in their inboxes. Now, you can use a variety of tools for the task. But what makes most of the impact is, the design. That's what people notice before they notice anything else, ofcourse you need to have advanced options too. In this article, we will show you the top 4 best Email marketing tool to build your blog audience so you can make most of every user. 1. GetResponse: The reason for me listing GetResponse right at the top is pretty simple. Cause, it's the best. As far as feature, service and the price is concerned. ...