MainframeSupports
tip week 38/2016:

Sometimes you run into problems which are very hard to solve and it is acceptable that the problem stays unsolved because it only arises in special situations. If you have encountered the ISPF error "ISPT036 Table in use ... ENQUEUE failed" in ISPF batch, I am pretty sure you know what I mean. My good friend and colleague Johnny Mossin insisted on solving this problem once and for all and he was successful. Even though it is a rare problem I will tell you about the solution. Then you do not have to struggle for hours finding a solution to the problem.

"ISPT036 Table in use ... ENQUEUE failed" may arise in different situations in ISPF batch and the quick fix is to allocate a temporary ISPPROF dataset. Only in a very few cases this solution is not enough for instance if you are running two or more ISPF batch jobs in parallel. Then you can use the following solution:

//IEBCOPY  EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//SYSUT1   DD DSN=SYS1.SISPTENU,DISP=SHR
//SYSUT2   DD DSN=&ISPPROF,DISP=(NEW,PASS),SPACE=(TRK,(1,1,1)),
//            UNIT=VIO,LRECL=80,RECFM=FB
//SYSIN    DD *
  COPY INDD=SYSUT1,OUTDD=SYSUT2
  S M=ISPSPROF
  S M=ISPPROF
/*
//RUNISPF  EXEC PGM=IKJEFT01,DYNAMNBR=200,PARM='%RUNISPF'
//SYSEXEC  DD DISP=SHR,DSN=MY.REXX.LIBRARY
//ISPSLIB  DD DISP=SHR,DSN=MY.REXX.SKELETON
//ISPFILE  DD SYSOUT=*,LRECL=80,RECFM=FB
//SYSTSIN  DD DUMMY
//SYSTSPRT DD SYSOUT=*
//ISPMLIB  DD DSN=SYS1.SISPMENU,DISP=SHR
//ISPPLIB  DD DSN=SYS1.SISPPENU,DISP=SHR
//ISPTLIB  DD DSN=SYS1.SISPTENU,DISP=SHR
//ISPTABL  DD DSN=&ISPTABL,DISP=(NEW,PASS),SPACE=(TRK,(1,1,1)),
//            UNIT=VIO,LRECL=80,RECFM=FB
//ISPPROF  DD DSN=&ISPPROF,DISP=(OLD,PASS)
//ISPLOG   DD SYSOUT=*,LRECL=120,RECFM=FB

Normally the ISPPROF allocation in the RUNISPF step would be the same as the ISPTABL allocation in the example above and it usually gets rid of the ISPT036 error. But if you want to be absolutely sure you do not run into the error on ISPPROF you need to pre-allocate the ISPPROF dataset as in the IEBCOPY step above. And on top of that you must copy the specified two members from another ISPPROF dataset to the temporary ISPPROF dataset. In this example I have used the SISPTENU dataset from the ISPF installation library. This dataset may have a different name than SYS1.SISPTENU on your installation. Contact your local ISPF systems programmer in order to get the dataset name used for SISPTENU at your installation. You can also use the members from your own ISPPROF dataset.

Previous tip in english        Forrige danske tip        Tip list