The input file may be corrupted if the L-Serv LDMAMS utility fails during a COMPRESS. How can this be prevented?
search cancel

The input file may be corrupted if the L-Serv LDMAMS utility fails during a COMPRESS. How can this be prevented?

book

Article ID: 38055

calendar_today

Updated On:

Products

COMMON SERVICES FOR Z/OS 90S SERVICES COMMON PRODUCT SERVICES COMPONENT Common Services

Issue/Introduction

 An abend in L-Serv can cause the corruption of a file when LDMAMS is processing a COMPRESS.  How can this be prevented?

 

 

 

 

Environment

LSERV

L-SERV

Cause

The LDMAMS COMPRESS has been interrupted which corrupts the partially rebuilt VSAM file. 

The root cause of such situation can be an Abend in L-Serv or an external access to the dataset that is currently compressed. 

Resolution

It is recommended to backup a file before running a COMPRESS. This is also recommended when using LDMAMS utility within LServ.

Here is the best practice sequence to COMPRESS a VSAM dataset including a BACKUP:

1 - Run a LDMAMS step for each VSAM you need to COMPRESS.                                 
2 - Add a LDMAMS Backup/COPY command before the COMPRESS command. The COMPRESS will start if the LDMAMS Copy completed successfully.   

The SYSIN contains the commands :                                         
                                                                          
REPRO         INFILE(PRODKSDS) OUTFILE(KSDSBKP) REPLACE REUSE                  
COMPRESS INFILE(PRODKSDS) WORKFILE(PRODCOPY)                              
                                                                          
Note : Options REPLACE and REUSE may be coded in case KSDSBKP is not empty.
                                                                          
If the REPRO failed LDMAMS won't execute the command COMPRESS but will  issue message :                                                           
'LDM0811E Statement skipped due to previous error'                        
This way, the REPRO allows to check that the KSDS is ready for the compress.

 

 

Additional Information

For further information, please see "Maintain Managed Files" in the L-Serv Chapter found in the Common Services Administration Guide