There may be reasons for directly examining the content of a z/OS LogStream or even removing records from a LogStream. The utility, SQDutil can be used to accomplish both. The dump action is non-destructive and can be used to view both the contents and the Block ID and Storeclock associated with each record in the LogStream. The clean action is DESTRUCTIVE and will permanently remove records from the LogStream.
Warning: Clean will do what you ask. Double check the content of the LogStream and the value specified for the Block ID or Storeclock using the dump action first. Be very cautious before using Clean against a production datastore.
Warning: SQDutil has no way to know what is in the LogStream specified. It can clean any LogStream the user has write access to, including a VSAM forward recovery log or even a system zlog.
JCL similar to the following can be used to dump a z/OS LogStream:
//SQDUTIL JOB 1,MSGLEVEL=(1,1),MSGCLASS=H,NOTIFY=&SYSUID
//*
//JOBLIB DD DISP=SHR,DSN=SQDATA.V4xx.LOADLIB
//*----------------------------------------
//DUMP EXEC PGM=SQDUTIL
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//*SQDLOG8 DD DUMMY
//SQDLOG DD SYSOUT=*
//SQDPARMS DD *
dump zlog:///SQDATA.CDC.LOG1
Once the content has been verified and the Block ID and Storeclock of the last known "good" record has been identified, you may perform the clean action using JCL similar to the following:
//SQDUTIL JOB 1,MSGLEVEL=(1,1),MSGCLASS=H,NOTIFY=&SYSUID
//*
//JOBLIB DD DISP=SHR,DSN=SQDATA.V4xx.LOADLIB
//*----------------------------------------
//CLEAN EXEC PGM=SQDUTIL
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//*SQDLOG DD DUMMY
//SQDLOG DD SYSOUT=*
//SQDPARMS DD *
clean --stck=0xca742e39763fd005 zlog:///SQDATA.CDC.LOG1
Note: For more information including how to convert from and to the STCK value outside the product, see STORECLOCK.