Description
Running multiple sub-tasks, and need to single thread an entity type - IMS PSBs and ACBs which require running a program to update these dynamically. Doing two PSB's at the same time caused two sub tasks to hang in a deadly embrace over the ACB data sets. Cancelling the sub tasks did not help, and we had to restart Alchemist.
Is there an alternative to running the PSB's in separate requests?
Solution
Try using the ENQUEUE keyword on the PCL DD statement for the TFILE data set that needs to be single-threaded.
ENQUEUE parameter:
You do not need to (and should not) use the ENQUEUE parameter under these circumstances:
When other programs create target files, use the PCL ENQUEUE parameter to serialize access to the library, for example,
//SYSUT2 DD DSNAME=&ASRETD.TGDSN(3),DISP=SHR, // VOL=SER=&ASRETD.TGVOL(3),ENQUEUE=SPFDSN
NOTE: Always use the ENQUEUE name SPFDSN for source and DBRM libraries, and the ENQUEUE name SYSIEWLP for load libraries.
DD Statement Syntax:
//{ddname DD JCL-subparameters}, // {FORMAT=({[STD]|[XNUM]|[NONUM]|[COBOL]|[DATA]}, // {[NOSUB]|[SUB]|[DEFERSUB]})}, // [ENQUEUE=(qname1[,qname2]...)]
Examples:
//OUTDD DD DSN=&TODSN1,DISP=SHR,ENQUEUE=SYSIEWLP //SYSUT2 DD DSN=ABC1.TF.PSB,DISP=SHR, // ...,ENQUEUE= IMSPSBS