+ Reply to Thread
Results 1 to 4 of 4

Thread: Why is there still a wait?

  1. #1
    Guest.Visitor Guest

    Default Why is there still a wait?

    Can someone please help. My CL is: PGM ALCOBJ OBJ((R90SUM *FILE *SHRRD)) WAIT(0) CLRPFM FILE(R90SUM) MONMSG MSGID(CPF0000) EXEC(GOTO CMDLBL(SKIP)) CALL PGM(MAR90SUM) SKIP: CALL PGM(MAR90) PARM(' ') DLCOBJ OBJ((R90SUM *FILE *SHRRD)) RCLRSC RETURN ENDPGM The problem is, when another user calls this program up, it hangs for 60 seconds. Any suggestions? Thanks again in advance.

  2. #2

    Default Why is there still a wait?

    The short answer, Olga, is that the CLRPFM requires an exclusive lock on the data in the phsyical file member. The ALCOBJ *SHRRD is not enough to allow the CLRPFM to execute. On the other hand, this lock IS enough to stop any OTHER job from doing a CLRPFM. If you want to allocate the object sufficiently to allow a clear, you need to do an ALCOBJ *EXCL. I have to admit, however, that your program has me intrigued. It seems you want to clear the R90SUM file, and then run the program MAR90SUM, which presumably then populates the the R90SUM file. Then you want to run another program which presumably processes the data output by MAR90SUM. However, if the clear fails (because of a lock problem?) you want to skip the populate program and run the processing program. I guess I don't understand the business requirement behind this... care to enlighten me? Joe src="//www.zappie.net/java/_derived/index.htm_cmp_zero110_vbtn_p.gif" width="140" height="60" border="0" alt="Java400.net - Java/400 Freeware" align="middle"> Java400.Net - where the AS/400 speaks Java with an RPG accent Home of PBD2.0, the color=red>FREE Java/400 Client/Server color=blue>Revitalization Toolkit

  3. #3
    Guest.Visitor Guest

    Default Why is there still a wait?

    Joe, the processing program is an inquiry on a work file. I assume here that if the clear fails, the work file has already been populated. What I am trying to say is, I want the ability to have more than one user at a time run this procedure. It's been a very long day...Thanks for the response!

  4. #4

    Default Why is there still a wait?

    Olga, Why not make the work file a variable name, and then use the OVRDBF command to point to the variable. You could even place the file name in QTEMP for even more flexibility. In either manner, any user could have their own copy of the work file, and no one would have to wait, or be locked out. Dave

+ Reply to Thread

Similar Threads

  1. Should You Hurry Up or Should You Wait?
    By Guest.Visitor in forum General
    Replies: 2
    Last Post: 04-04-2005, 06:59 AM
  2. Replies: 2
    Last Post: 05-21-2004, 07:11 AM
  3. Get Ready for Web Services! (Oops! Wait!)
    By MCWebsite.Staff in forum Commentary
    Replies: 1
    Last Post: 04-07-2003, 09:58 AM
  4. CHecking for *WAIT for a File
    By Guest.Visitor in forum Programming
    Replies: 2
    Last Post: 03-18-2000, 07:29 AM
  5. I want to get rid of this MTXW(mutex wait)
    By Guest.Visitor in forum Internet
    Replies: 0
    Last Post: 01-01-1995, 02:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts