Occasionally, a device cannot be varied off because of a lock on the object for the device description (object type *DEVD). When this happens, running the WRKACTJOB command usually shows no active job using that device and WRKCFGSTS for the device may show the device as ACTIVE with no job for the device. If this is the case, then the device lock is usually held by the QSYSARB system job. This can be ascertained by using the WRKOBJLCK command. Specify the device name as the object name, QSYS as the library, and *DEVD as the object type. In this case, QSYSARB is shown as holding a lock on the device description.
To release such a lock so that the device can be varied off, the lock buster tool can be used. This tool is the callable program QCMNGETL. The tool program can be electronically downloaded as a PTF. The name of the PTF and its product for each related release level is given below:
Note: The APAR number listed below for each of the Releases is the PTF number.
R230 - SA32770 - 5738SS1
R305 - SA32826 - 5763SS1
R310 - SA39587 - 5763SS1
R320 - SA56482 - 5763SS1
R360 - SA47597- 5716SS1
R370 - SA58912 - 5716SS1
R410 - SA66076 - 5769SS1
R420 - SA70781 - 5769SS1
R430 - SA76901 - 5769SS1
The PTF should be loaded and applied temporarily after it has been downloaded on OS/400. To use the tool, on the OS/400 command line type the following:
CALL QCMNGETL devname
where devname is the name of the device description. If the tool succeeds in obtaining the lock away from QSYSARB, you can vary off the device. To vary off the device you can sign off from the session from which you entered the CALL QCMNGETL command to release the lock and then can sign back on and enter the VRYCFG command to vary the device first off and then back on. Read the cover letter provided with the PTF for additional information.
There can be other scenarios for which this lock buster tool can succeed in freeing up a device lock. If the lock is held by a subsystem monitor job, the lock buster should be able to free the lock. If the lock is held by a user job, (an interactive job or a related communication job), the lock buster is not able to free the lock. In this case, the job holding the lock must be ended to free the lock. Another scenario where this does not work is when the lock is held by system process QLUS. In this case, an IPL is required to release the lock.
An IPL necessarily frees all locks as all locking information is cleared when the system does a power down.
For Release Level R440 and Later
The lock buster tool is not needed at release level V4R4M0 and later. Rather, the VRYCFG command can be used to effect the unlock of the device. This command has a new option for the Forced vary off (FRCVRYOFF) parameter which was added at R440. This new option value is *LOCK. The help text for the FRCVRYOFF command is:
Forced vary off (FRCVRYOFF) - Help
Specifies whether inquiry messages for active jobs will be issued. This parameter is not allowed when STATUS(*ON) is specified.
The possible values are:
*NO: Inquiry messages for active jobs will be issued.
*YES: Inquiry messages for active jobs will not be issued and the jobs will be ended.
*LOCK: For devices other than APPC and Intra, an attempt will be made to get a lock on the device description no matter what its current status might be. If the lock is successfully obtained, it will be transferred to the system job assigned to hold the device description lock when the device is in a varied off state. If the device is in a state other than varied off, an attempt to vary off the device description will also be made.
At R440 and later, the system job that the lock is transferred to is QCMNARBxx. This is changed from the QSYSARB job to reduce the processing load on the system.
The appropriate action to release one of these locks is to issue the VRYCFG command with the FRCVRYOFF(*LOCK) parameter specified. User's should use FRCVRYOFF(*LOCK) only if it is truly needed to resolve a locking problem. It should not be specified all the time since it causes additional work for all the subsystem jobs.
Additional Information:
1 To determine whether or not the appropriate lock buster PTF is on your system, on the OS/400 command line type the following:
DSPPTF LICPGM(product) SELECT(ptfname)
where product is the product and ptfname is the PTF given in the list above for your system release level. Press the Enter key.
2 To order the PTF, on the OS/400 command line type the following:
SNDPTFORD PTFID((ptfname)) PTFPART(*ALL)
where ptfname is the PTF given in the list above for your system release level. Press the Enter key.
3 To load the PTF, on the OS/400 command line type the following:
LODPTF LICPGM(product) SELECT(ptfname)
where product is the product and ptfname is the PTF given in the list above for your system release level. Press the Enter key.
4 To apply the PTF, on the OS/400 command line type the following:
APYPTF LICPGM(product) SELECT(ptfname) APY(*TEMP)
where product is the product and ptfname is the PTF given in the list above for your system release level. Press the Enter key.
zhangyu4034 回复于:2003-07-16 15:09:14 |
什么东西? |
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/