Sometimes you want to allocate an object for a job before the job needs the object, to ensure its availability so a function that has only partially completed would not have to wait for an object. This is called preallocating an object. You can preallocate objects using the Allocate Object (ALCOBJ) command. To allocate an object, you must have object existence authority, object management authority, or operational authority for the object. Allocated objects are automatically deallocated at the end of a routing step. To deallocate an object at any other time, use the Deallocate Object (DLCOBJ) command.
ALCOBJ:用于锁定某文件 例:ALCOBJ OBJ((TWFSFTP *FILE *EXCLRD *FIRST)) WAIT(5)
锁定文件TWFSFTP, 其他用户只读,如果5s内无法锁定,则报错
*SHRRD
The lock state is shared for read.
*SHRNUP
The lock state is shared, no update.
*SHRUPD
The lock state is shared for update.
*EXCLRD
The lock state is exclusive, allow read.
*EXCL
The lock state is exclusive, no read.
DLCOBJ: 用于解锁 例:DLCOBJ OBJ((TWFSFTP *FILE *EXCLRD *FIRST))
阅读(3008) | 评论(0) | 转发(0) |