Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

REXX with ISPF

Status
Not open for further replies.

wossilat

Programmer
Mar 21, 2002
8
DE
Hello,

i have a little problem with a rexx script that uses ISPF services. There are two jobs to search for files with wildcards. Normally these jobs are subbmitted by the scheduler at the same time and so one of them became an error that looks like this:

ISPT036 Table in use -/-TBOPEN issued for table ISPPROF that is in use, ENQUEUE failed.

It themes to be a problem that i use them same table over ispf, but i can't find waht i have to change.
The jcl for these jobs is attched, so i hope anyone can help me to fix this problem.

Thanks

Ludger
================================
JOB1:
-----------------------------------------------
//TSO EXEC PGM=IKJEFT01,DYNAMNBR=30,TIME=30,
// PARM=('ISPSTART','CMD(RXGENDYN &FBPDS,&FBWDS,&FBLC,C&CYCLE,*EM,A,
// ERRORMSG,FZ20)')
//ISPFILE DD DSN=&&ISPFILE,DISP=(,PASS),SPACE=&SPACES,
// DCB=(LRECL=80,BLKSIZE=19040,RECFM=FB,DSORG=PS)
//ISPLOG DD DSN=&&ISPLOG,DISP=(,DELETE),SPACE=&SPACES,
// DCB=(LRECL=80,BLKSIZE=19040,RECFM=FB,DSORG=PS)
//ISPMLIB DD DISP=SHR,DSN=SYS2.DBP.MSGS
//* DD DISP=SHR,DSN=SYS2.PP.ISPF.MSGS
// DD DISP=SHR,DSN=SYS1.SISPMENU
//ISPPLIB DD DISP=SHR,DSN=SYS2.DBP.PANELS
//* DD DISP=SHR,DSN=SYS2.PP.ISPF.PANELS
// DD DISP=SHR,DSN=SYS1.SISPPENU
//ISPPROF DD DSN=&&ISPPROF,DISP=(,DELETE),SPACE=(TRK,(1,1,1)),
// DCB=(LRECL=80,BLKSIZE=19040,RECFM=FB,DSORG=PO)
//ISPSLIB DD DISP=SHR,DSN=SYS2.DBP.SKELS
//* DD DISP=SHR,DSN=SYS2.PP.ISPF.SKELS
// DD DISP=SHR,DSN=SYS1.SISPSLIB
//ISPTABL DD DUMMY
//ISPTLIB DD DISP=SHR,DSN=SYS2.DBP.TABLES
//* DD DISP=SHR,DSN=SYS2.PP.ISPF.TABLES
// DD DISP=SHR,DSN=SYS1.SISPTENU
//SYSABOUT DD SYSOUT=Z
//SYSDSPLY DD SYSOUT=Z
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSPROC DD DISP=SHR,DSN=&FBPDS..&FBLC..CLIST
// DD DISP=SHR,DSN=SYS2.DBP.CLIST
// DD DISP=SHR,DSN=SYS1.SISPCLIB
//SYSTSPRT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTSIN DD DUMMY
//*

JOB2:
-------------------------------------
//TSO EXEC PGM=IKJEFT01,DYNAMNBR=30,TIME=30,
// PARM=('ISPSTART','CMD(RXDELETE &FBWDS,&FBLC,IN.C&CYCLE,,SRT)')
//*
//ISPFILE DD DSN=&&ISPFILE,DISP=(,PASS),SPACE=&SPACES,
// DCB=(LRECL=80,BLKSIZE=19040,RECFM=FB,DSORG=PS)
//ISPLOG DD DSN=&&ISPLOG,DISP=(,DELETE),SPACE=&SPACES,
// DCB=(LRECL=80,BLKSIZE=19040,RECFM=FB,DSORG=PS)
//ISPMLIB DD DISP=SHR,DSN=SYS2.DBP.MSGS
//* DD DISP=SHR,DSN=SYS2.PP.ISPF.MSGS
// DD DISP=SHR,DSN=SYS1.SISPMENU
//ISPPLIB DD DISP=SHR,DSN=SYS2.DBP.PANELS
//* DD DISP=SHR,DSN=SYS2.PP.ISPF.PANELS
// DD DISP=SHR,DSN=SYS1.SISPPENU
//ISPPROF DD DSN=&&ISPPROF,DISP=(,DELETE),SPACE=(TRK,(1,1,1)),
// DCB=(LRECL=80,BLKSIZE=19040,RECFM=FB,DSORG=PO)
//ISPSLIB DD DISP=SHR,DSN=SYS2.DBP.SKELS
//* DD DISP=SHR,DSN=SYS2.PP.ISPF.SKELS
// DD DISP=SHR,DSN=SYS1.SISPSLIB
//ISPTABL DD DUMMY
//ISPTLIB DD DISP=SHR,DSN=SYS2.DBP.TABLES
//* DD DISP=SHR,DSN=SYS2.PP.ISPF.TABLES
// DD DISP=SHR,DSN=SYS1.SISPTENU
//SYSABOUT DD SYSOUT=Z
//SYSDSPLY DD SYSOUT=Z
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSPROC DD DISP=SHR,DSN=&FBPDS..&FBLC..CLIST
// DD DISP=SHR,DSN=SYS2.DBP.CLIST
// DD DISP=SHR,DSN=SYS1.SISPCLIB
//SYSTSPRT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTSIN DD DUMMY
//*

An this is the call of ispf in the rexx scripts:
------------------------------------------------
Address ISPEXEC "LMDINIT LISTID(MYID) LEVEL(&DATEI)"
Do forever
Address ISPEXEC "LMDLIST LISTID(&MYID),
OPTION(LIST) DATASET(DATEI) STATS(NO) GROUP(TEMP)"
if RC /= 0 then leave
i = i+1
list.i = Datei
list.0 = i
say Datei
end
 
Both jobs use a temporary ds for ISPPROF and you're getting contention? Offhand I'd say this is extremely unlikely. I wonder what RXDELETE is doing under the covers.

Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn Listmaster
 
I've found the reason for the problems:

ISPT036 'Table in use-'table service' issued for table 'table name' that is in use, ENQUEUE failed.
This message frequently occurs when batch jobs that use ISPF services run concurrently.
This occurs because most batch jobs allocate a new profile each time they run. ISPF issues a TBOPEN against ISPPROF DD card for member ISPSPROF. The TBOPEN fails since ISPPROF does not contain this member. ISPF then issues a TBOPEN against ISPTLIB to copy the default ISPSPROF from ISPTLIB to ISPPROF.

If the first data set in the ISPTLIB concatenation sequence is the same for two batch jobs running concurrently, message ISPT036 is issued.
To make sure that this condition does not occur, the first data set in the ISPTLIB concatenation should be user unique. For example, 'sysuid..ISPPROF' would be a user unique data set, which could be used as the first data set concatenated to the ISPTLIB DD.
For the same reasons, this problem can also occur when two users logon to ISPF for the first time if they have the same data set concatenated first in the ISPTLIB concatenation.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top