Tip

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.

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

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
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
Sort by: OldestNewest

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:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.