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 first published in February 2006

Dig deeper on iSeries programming commands

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchEnterpriseLinux

SearchDataCenter

Close