Slide 1

Slide notes: In this tutorial we consider how to manage Data Locks. From the Systems Administration menu, we choose File and Data Controls, and then we select Data Locks.

 

 

 

Slide 2

Slide notes:

 

 

 

Slide 3

Slide notes:

 

 

 

Slide 4

Slide notes:

 

 

 

Slide 5

Slide notes: Data Locks can potentially be experienced in a Multi User environment where multiple Users try to update the same record at the same time. A Data Lock is legitimate when a 2nd User is prevented from updating a Record in a File Maintenance action while a 1st User is already holding that same record, and the 2nd User should wait or try later. However, the system also updates many multiples of records in various system actions, and when there is an abnormal Session ending or hang, a Data Lock can possibly remain, in some cases, that now prevents normal use of some functions. This is the type of Data Lock that we need to deal with and that we are discussing here. It does not necessarily happen often, but if it does, then what is one supposed to do? That is what the Help here is explaining. If there is no Systems Administrator, then the QM Database Service can be stopped and re-started, which will release all data locks in the process, but in a working multi-User environment we may not want to take such drastic action, and we have other tools to correct the problem.

 

 

 

 

Slide 6

Slide notes:

 

 

 

Slide 7

Slide notes: We can use a Console or Telnet Session to perform the necessary action, and in this example we will use a Console Session.

 

 

 

Slide 8

Slide notes:

 

 

 

Slide 9

Slide notes: Data Locks can only be released in the QMSYS Datamart, and by a User with Administrator privileges. When we type the LIST.READU command, then the system will display all current Data Locks.

 

 

 

Slide 10

Slide notes: In fact, there are no such Locks at the moment.

 

 

 

Slide 11

Slide notes: So, we have now created some locks, so that we can demonstrate what will happen. We repeat the Command again.

 

 

 

Slide 12

Slide notes: And now we see a Data Lock on file HDOCS in the INFOLAB Datamart. We can clear data locks by User or by File number. In the 1st example, we will do it by User number, and this command will unlock all data locks kept by the stated User Number.

 

 

 

Slide 13

Slide notes:

 

 

 

Slide 14

Slide notes:  There are now no Data Locks listed, and it is clear that the UNLOCK command has worked properly.

 

 

 

Slide 15

Slide notes: We have created a Lock again, to demonstrate further.

 

 

 

Slide 16

Slide notes: So here we have a data lock again, for the same User and File, but a different Record Key this time. And this time we unlock by using the File Number.

 

 

 

Slide 17

Slide notes:

 

 

 

Slide 18

Slide notes: Once again, as we can see, the UNLOCK command has done it's work. So this is how a Systems Administrator can perform unlocking of Data Locks that are no longer valid.