Understanding the way the CA L-Serv LDMAMS Utility functions will help administrators to secure the files to be COMPRESSED and eliminate the risk of file corruption.

book

Article ID: 38104

calendar_today

Updated On:

Products

CA CIS CA Common Services for z/OS CA 90s Services CA Database Management Solutions for DB2 for z/OS CA Common Product Services Component CA Common Services CA Datacom/AD CA ecoMeter Server Component FOC CA Easytrieve Report Generator for Common Services CA Infocai Maintenance CA IPC Unicenter CA-JCLCheck Common Component CA Mainframe VM Product Manager CA Chorus Software Manager CA On Demand Portal CA Service Desk Manager - Unified Self Service CA PAM Client for Linux for zSeries CA Mainframe Connector for Linux on System z CA Graphical Management Interface CA Web Administrator for Top Secret CA CA- Xpertware CA Compress Data Compression for MVS CA Compress Data Compression for Fujitsu

Issue/Introduction

Understanding the way the CA-L-Serv LDMAMS utility functions will help administrators use it to it's fullest advantage.    
The following Best Practices allow you to secure the file and guard against a loss of data while using this powerful utility.

Knowledge of L-Serv is an essential prerequisite. 

Environment

Release: CA90SV00200-12-Common Services-for z/OS
Component:

Resolution

The LDMAMS Utility logs any activity to the SYSPRINT DD.

  • This important information should be retained for further review.
    • It can be used to resolve any issues with a recently managed file.
  • During execution, LDMAMS issues message LDM08xxx during completion of internal steps.
                                                                                
    1 - How does LDMAMS function?                                                  
                                                                                
    The LDMAMS COMPRESS action executes 3 steps.                
    1  LDMAMS copies the data from the KSDS to the workfile,                    
    2a ------ resets the KSDS                                                   
    2b ------ copies the data from the workfile to the KSDS,                    
    but only 2a and 2b are done in sequence.  

LDMAMS issues message LDM0810I when it has completed the 1st step.     
At this point the workfile is similar to a backup of the KSDS.
However, the workfile is a temporary work dataset and will not be kept if  the next step fails.                                                
LDMAMS issue message LDM0812I when it has completed the COMPRESS.                     
                                                                       
If LDMAMS fail at any time before the step 2a or during the step 2a or the step 2b, there is a risk of corruption.                                                
                                                                        
To avoid this risk, we can improve the LDMAMS process by securing the files before the compress is executed.  The following two methods can be used to
secure your LDMAMS job:                   
                                                                           
1 : The first method is widely used; take a backup before the compress.                                      
      This can be done with LDMAMS, first, create a job that performs the following :                  
 11 Step - Backup                                                            
 12 Step - Compress        -> COND Step 1 must be OK                           
 13 Step - Restore KSDS  -> COND Step 1 must be OK and Step 2 executed but it failed.                                  
                                                                           
2 : The second method will do the same but in a single step, an LDMAMS job that executes these functions:                                                                          
 21 - Backup                                                                
 22 - Compress                                                              
                                                                           
The LDMAMS available commands that will accomplish these steps are:                    

1 - To backup      your KSDS defined with LServ ddname PRODKSDS to a cataloged file allocated with ddname KSDSBKP.                                       
2 - To Compress your KSDS defined with  LServ ddname PRODKSDS using a Workfile allocated with ddname PRODCOPY.                                      

                                                                         
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 fails, LDMAMS won't execute the command COMPRESS but will issue message :                                                           
'LDM0811E Statement skipped due to previous error'                        
The failed REPRO prevents the COMPRESS from taking place and no action will be taken against the KSDS
A successful REPRO will allow LDMAMS to COMPRESS the file .
                                                                          
Method 2 is the preferred method since it easier to implement.                      
                                                                       
Note : Before attempting to compress a KSDS, any activities that require the KSDS, must be shutdown.                                                      
The LServ command 'DISPLAY >SESSIONS' lists the opened sessions in LServ.

It is safer to run the maintenance jobs when there is no user and job activity.                                                              

Additional Information

Article 38090 describes methods you can use to determine if any L-Serv managed files are currently in use. See Article 38090 

Further information on the LDMAMS Utility and other information on L-SERV is found in:

  • The CA Common Services Administration Guide.  
    • Look in the "Maintain Managed Files" section of Chapter 8: CA-L-Serv.
  • The LDMAMS found in the CA Common Services Documentation wiki
    • Refer to the topics beginning with CA-LServ commands