Clean |
Scroll |
Clean, meaning remove data from a z/OS LogStream source URL only. The action is destructive, the source records are permanently removed from the source.
Syntax
sqdutil clean zlog:///<logstream_name> [options]
Parameter
zlog:///<logstream_name> - The source URL for the z/OS LogStream to be cleaned. Note, the logstream_name must not be enclosed in single or double quotes.
Options
--bid=0x<bid_value> - Deletes all records with a Block ID (bid) lower than the value specified in <bid_value>.
--stck=0x<stck_value> - Deletes all log records with a Storeclock (STCK) lower than the value specified in <stck_value>.
--all - Deletes all log records from a logstream.
WARNING: Clean will do what you ask! Use caution when running sqdutil clean to delete records from a z/OS LogStream. Cleaning records from an active LogStream (i.e. one being monitored by a publisher) may cause the publisher to terminate abnormally. You may also want to avoid cleaning CICS forward recovery logs unless they are only being used for changed data capture and not actual recovery purposes.
WARNING: SQDutil knows nothing about the content of the LogStream specified. It can clean any LogStream the user has write access to, including possibly a VSAM forward recovery log or even a system zlog!
Note, BEFORE using the clean action, use the SQDutil Utility with the dump action to view both the content and the Block ID/Storeclock values for each log record to ensure that you are looking at the intended LogStream because clean is a permanent destructive operation.
Example 1
Delete all of the records in z/OS LogStream SQDATA.VSAMCDC.LOGn
//SQDUTIL EXEC PGM=SQDUTIL
//SQDPUBL DD DSN=&SYSUID.NACL.PUBLIC,DISP=SHR
//SQDPKEY DD DSN=&SYSUID.NACL.PRIVATE,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SQDPARMS DD *
clean zlog:///SQDATA.VSAMCDC.LOGn --all
/*
//
Example 2
Delete z/OS LogStream records that have an IMS Storeclock (STCK) value less than or equal to 0xd381de8e8b5ebbc0
//SQDUTIL EXEC PGM=SQDUTIL
//SQDPUBL DD DSN=&SYSUID.NACL.PUBLIC,DISP=SHR
//SQDPKEY DD DSN=&SYSUID.NACL.PRIVATE,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SQDPARMS DD *
clean zlog:///SQDATA.IMSCDC.LOGn --stck=0xd381de8e8b5ebbc0
/*
//