Executed the IDCAMS step to delete the output component, but another user BROWSE the dataset in ISPF 3.4, so the "IKJ56225I DATA SET xxxx.xxxx in that step ALREADY IN USE, TRY LATER" message ( RC=08) was output.
Is there any way to work around this situation?
JCL:
//* DELETE userfile 25/01/09
//CWDDSB EXEC PGM=IDCAMS,MAXRC=0,
// EXECIF=((&C1STAGE,NE,pr),(&C1STAGE,NE,it),(&C1ELTYPE,NE,cobobj),
// (&C1ELTYPE,NE,cobcidb),(&C1ELTYPE,NE,cobcics),
// (&C1ELTYPE,NE,epccics),
// (&C1ACTION,NE,move))
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE &userfile(&C1ELEMENT)
/*
Message:
DELETE Prefix.cics.userfile(member)
IKJ56225I DATA SET Prefix.cics.userfile ALREADY IN USE, TRY LATER
IKJ56225I DATA SET IS ALLOCATED TO ANOTHER JOB OR USER
IDC0548I ** MEMBER member NOT DELETED
IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 8
IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 8
OS : z/OS
Release : ALL
You have not specified an output component file and DISP=SHR in the JCL. By specifying it, You can avoid IKJ56225I by specifying that.
Also, if the member does not exist, the proc step ends with cc=8.
If you want to work around this, code as follows.
Sample JCL:
//DELETE EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//DD1 DD DISP=SHR,DSN=Prefix.cics.userfile
//SYSIN DD *
DELETE Prefix.cics.userfile(member)
IF MAXCC LE 8 THEN SET MAXCC = 0