MainframeSupports
tip week 20/2004:

Once you have started using ISPF file tailoring, you want to use file tailoring in batch jobs sooner or later. Then you get a bit annoyed when it sometimes doesn't seem to work. When this happens ISPF tells you that the dataset <userid>.SPFTEMP*.CNTL is in use by another user.

There is only one way to avoid this situation from occuring again. You have to allocate some ISPF WORK datasets in your batch job. All SPFTEMP*.CNTL datasets are datasets automatically allocated by ISPF when you don't allocate WORK datasets explicitly. Because of this automation feature in ISPF very few installations bother to allocate the ISPF WORK datasets, but it gives you problems when the same TSO user has to use SPFTEMP1.CNTL from two different TSO sessions at the same time for instance from online and from batch. Only one of the sessions will be allowed to continue.

The ISPF WORK datasets can be allocated to any TSO/ISPF session both batch and online. The common setup is that TSO/ISPF online uses the SPFTEMP*.CNTL datasets and then it is up to you to use the WORK datasets in batch. All you have to do is to add the following two allocations to all your TSO/ISPF batch jobs:

//ISPCTL0 DD DISP=NEW,UNIT=VIO,SPACE=(TRK,(5,5)),
// LRECL=80,BLKSIZE=0,RECFM=FB
//ISPCTL1 DD DISP=NEW,UNIT=VIO,SPACE=(TRK,(5,5)),
// LRECL=80,BLKSIZE=0,RECFM=FB

ISPF stores the last EDIT submitted batch job in DD name ISPCTL0. You will rarely do this in batch, but it has to be allocated anyway. DD name ISPCTL1 is where ISPF stores the result of your file tailoring when you use FTOPEN TEMP. Actually ISPCTL1 is used for FTOPEN TEMP in your first split screen session. ISPCTL2 is used for FTOPEN TEMP in your second split screen session and so forth. I can hardly imagine that you will make split sessions in batch so you don't need to allocate more than ISPCTL0 and ISPCTL1 in batch.

If you want to use ISPCTL* datasets for your online TSO/ISPF session you must allocate them before you start ISPF and you must allocate one ISPCTL* dataset for every allowed split session. If your installation allows more than nine split sessions then the DD name for the tenth split is ISPCTLA and so forth for the following splits. Normally you don't have access to control the WORK dataset allocations for your online TSO session, but if you have then you must consider using VIO datasets carefully because they can hurt your central and expanded storage.

Previous tip in english        Sidste danske tip        Tip list