Add API_SQL
This commit is contained in:
+5
-2
@@ -1,11 +1,12 @@
|
||||
# Using IBM [Work Management Services](https://www.ibm.com/docs/en/i/7.4?topic=services-work-management)
|
||||
|
||||
IBM has begun providing access to APIs using SQL. The code here uses the QSYS2.OBJECT_LOCK_INFO SQL view. It is shorter and simplified code that can be used to replace that in [APIs which returns users who have a lock on an object](https://github.com/SJLennon/IBM-i-RPG-Free-CLP-Code/tree/master/APIs).
|
||||
IBM has begun providing access to APIs using SQL. The code here uses the QSYS2.OBJECT_LOCK_INFO SQL view. This is shorter and simplified code that can be used to replace that in [APIs which returns users who have a lock on an object](https://github.com/SJLennon/IBM-i-RPG-Free-CLP-Code/tree/master/APIs).
|
||||
|
||||
## GETOBJUSR.CMD
|
||||
|
||||
This command is the top level interface. It is unchanged from the version in [APIs](https://github.com/SJLennon/IBM-i-RPG-Free-CLP-Code/tree/master/APIs), but it provided here for completeness.
|
||||
Prompted, it looks like this:
|
||||
|
||||

|
||||
|
||||
You specify the object and type and the command returns information on the locks on the object. You can return a file of objects and/or a message.
|
||||
@@ -14,6 +15,7 @@ The returned file is GETOBJUP in QTEMP.
|
||||
|
||||
The returned message would be suitable for sending to the operator and look something like one of these:
|
||||

|
||||
|
||||

|
||||
|
||||
It shows the details of up to 4 jobs and lists how many additional jobs, if any, have locks.
|
||||
@@ -23,6 +25,7 @@ The job name can be copied and pasted into a WRKJOB command, e.g. `wrkjob 233920
|
||||
## GETOBJUP File
|
||||
|
||||
If requested, this file is created in QTEMP. The contents would look like this:
|
||||
|
||||

|
||||
|
||||
## GETOBJUC.CLLE
|
||||
@@ -33,7 +36,7 @@ This is the command processing program for the GETOBJUSR command. It does some h
|
||||
|
||||
This creates QTEMP/GETOBJUP if requested, using SQL. Then it retreives the job name using the QSYS2.OBJECT_LOCK_INFO view, and orders it by job name. It populates file GETOBJUP using SQL.
|
||||
|
||||
This about 100 lines shorter and it does not need the SRTUSRSPC program.
|
||||
This about 100 lines shorter then the version in [APIs](https://github.com/SJLennon/IBM-i-RPG-Free-CLP-Code/tree/master/APIs) and it does not need the SRTUSRSPC program.
|
||||
|
||||
## T0/T1/T2/T3.CLLE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user