Skip to main content
ExLibris
  • Subscribe by RSS
  • Ex Libris Knowledge Center

    File locked" error when running a batch job

    • Article Type: General
    • Product: Aleph
    • Product Version: 20, 21, 22, 23

    Description:
    A batch job fails with a message like this: I/O error : file 'TP1' error code: 9/065 (ANS74), pc=0, call=1, seg=0 65 File locked

    Resolution:
    This means that a file this job wants to create/use already exists and is in use by another job.

    1. this run of the job started before a previous run of the same job finished;
    2. a previous run of this job "hung" and you did not kill all of the job's processes or didn't delete a $data_scratch or $alephe_scratch lock file before resubmitting it; or
    3. multiple lib_batch processes running for the library are allowing multiple versions of the same job to run simultaneously. (See Article 000033195 ("File locked" error; job being started before preceding job has finished") (link below).

    You can check the procedure in the $aleph_proc to see what the file is.

    For example, in the procedure p_cir_51, we see this:

    cd $data_scratch
    setenv dd_TP1 cir_51_1.scr

    Thus, you should check for a cir_51_1.scr file in the $data_scratch directory.

    Also, you should check for a lock file in $alephe_scratch, such as, usm50_p_cir_51.5421.lock .

    Any lock files for a job which is not currently running should be deleted. Then resubmit the job.

    Note: "library locked" is an entirely different message.

    With the exception of Case #3 (multiple lib_batch processes), this should not happen in version 21 because the jobs have been changed to include a "datex" timestamp (yyyymmdd.hhmmss) in the workfile name.

    Additional Information

    Article link:  File locked" error; job being started before preceding job has finished

    A search on "File locked" brings up a number of other articles.


    • Article last edited: 2/12/2014