Skip to content

Instantly share code, notes, and snippets.

@alanseiden
Created February 12, 2016 14:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alanseiden/38161864ef2d25738314 to your computer and use it in GitHub Desktop.
Save alanseiden/38161864ef2d25738314 to your computer and use it in GitHub Desktop.
You can add the command below to the evening job stream that later allocates/clears the file. The command will ask any jobs having locks to release those locks. In my experience, this has worked perfectly with QSQSRVR jobs that hold *SHRRD pseudo-locks on the object.
For file MYFILE:
ALCOBJ OBJ((MYLIB/MYFILE *FILE *EXCL *N)) CONFLICT(*RQSRLS)
if a member:
ALCOBJ OBJ((MYLIB/MYFILE *FILE *EXCL MYMEMBER)) CONFLICT(*RQSRLS)
Make sure you add a MONMSG immediately after the ALCOBJ command to handle any messages such as "cannot allocate..." which may arise normally.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment