Who is using the Document Library Objects?

Sometimes when you are trying to access an IFS object you might get the message indicating the object is in use. There is no such command in iSeries to check the lock on the object. Using command WRKDLOLCK you can check if there is a lock on the document library object.

Sometimes when you are trying to access an IFS object you might get the message indicating the object is in use....

There is no such command in iSeries to check the lock on the object. Using command WRKDLOLCK you can check if there is a lock on the document library object.

The WRKDLOLCK command has following components:

 
WRKDLOLCK   *CMD 
WRKDLOLCK   *PGM  CL program

Following is the source code:

/*********************************************************************/
/*                    COMMAND : WRKDLOLCK                            */
/*                                                                   */
/*    THIS COMMAND IS USED TO CHECK LOCK ON DOCUMENTS IN QDLS        */
/*                                                                   */
/*                                                                   */
/*    AUTHOR : MOHAMMAD HANIF                                        */
/*********************************************************************/
                                                              
             CMD        PROMPT(WRKDLOLCK)                     
                                                              
             PARM       KWD(DOC) TYPE(*CHAR) LEN(12) MIN(1) + 
                          PROMPT('Document Name')             
                                                              
             PARM       KWD(FLR) TYPE(*CHAR) LEN(20) MIN(1) + 
                          PROMPT('Folder Name')               


/*********************************************************************/
/*                 CL PROGRAM : WRKDLOLCK                            */
/*                                                                   */
/*    THIS PROGRAM IS USED TO CHECK LOCK ON DOCUMENTS IN QDLS        */
/*                                                                   */
/*                                                                   */
/*    AUTHOR : MOHAMMAD HANIF                                        */
/*********************************************************************/
                                                                       
             PGM        PARM(&DOC &FLR)                                
                                                                       
             DCL        VAR(&DOC) TYPE(*CHAR) LEN(12)                  
             DCL        VAR(&FLR) TYPE(*CHAR) LEN(20)                  
             DCL        VAR(&SYSNAME) TYPE(*CHAR) LEN(10)              
                                                                       
/* RETRIEVE DOCUMENT SYSTEM NAME.....................................*/
                                                                       
             RTVDLONAM  DLO(&DOC) FLR(&FLR) RTNOBJNAM(&SYSNAME)        
                                                                       
             MONMSG     MSGID(CPF8A77) EXEC(DO)                        
             SNDPGMMSG  MSG('Folder name incorrect')                   
             GOTO ENDJOB                                               
             ENDDO
             
             MONMSG     MSGID(CPF8A82) EXEC(DO)                        
             SNDPGMMSG  MSG('Document name incorrect')                 
             GOTO ENDJOB                                               
             ENDDO                                                     
                                                                       
/* CHECKING LOCK ON THE DOCUMENT.....................................*/
                                                                       
             WRKOBJLCK  OBJ(QDOC/&SYSNAME) OBJTYPE(*DOC)               
                                                                       
 ENDJOB:     ENDPGM                                                     

  
  


  
This was last published in February 2006

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchEnterpriseLinux

SearchDataCenter

Close