Information
Space announcement We are no longer updating this space, and you cannot comment on this space. The CHANGE ACCUMULATION PLUS component is now documented in BMC AMI Backup and Recovery for IMS.

Examples ($RCUDSN macro)


This topic provides examples.

In the following figure: the first prototype format is used if the data set name produced is a change accumulation data set and is a member of a GDG.

CAP$DSN  CSECT
*=====================================================================*
*      CHANGE ACCUM PROTOTYPE - ANY CA COPY AND A GDG                 *
*=====================================================================*
         $RCUDSN   '#####################..####..########',            X
               FIELDS=(PREFIX,TYPE,CAGRP),                             X
               TYPE=CA,GDG=Y                                           
*
*=====================================================================*
*      CHANGE ACCUM PROTOTYPE - ANY CA COPY AND NOT A GDG             *
*=====================================================================*
         $RCUDSN   '#####################..####..########..D#####..T###X
               ###',FIELDS=(PREFIX,TYPE,CAGRP,DATE,RTIME),             X
               TYPE=CA,GDG=N                                            
*
         $RCUDSN   EXIT                                                 
*
         END
*
  • The first prototype format is used if the data set name produced is a change accumulation data set and is a member of a GDG.
  • The second prototype format is used if the data set produced is a change accumulation data set and is not a member of a GDG.
  • If none of the above are true, the Data Set Name user exit returns to the main task with a nonzero return code. The main task will indicate that the copy for which the exit was invoked will be disabled. In this example, the exit will generate data set names for all TYPES of change accumulation data sets (stacked, nonstacked; GDG, non-GDG; and CA, CA1 through CA10).

The following figure shows an example of how both change accumulation and image copy data set names can be generated from a single Data Set Name user exit.

CAP$DSN  CSECT                                                      
*======================================================================*
*      CHANGE ACCUM PROTOTYPE - ANY CA COPY AND A GDG                  *
*======================================================================*
         $RCUDSN   '#####################..####..########',             X
               FIELDS=(PREFIX,TYPE,CAGRP),                              X
               TYPE=CA,GDG=Y                                             
*======================================================================*
*      CHANGE ACCUM PROTOTYPE - ANY CA COPY AND NOT A GDG              *
*======================================================================*
         $RCUDSN    '#####################..####..########..D#####..T###X
               ###',FIELDS=(PREFIX,TYPE,CAGRP,DATE,RTIME),              X
               TYPE=CA,GDG=N                                             
*                                                                        
*======================================================================*
*     IMAGE COPY PROTOTYPE - COPY 1, STACKED IC, AND NOT A GDG         *
*======================================================================*
*                                                                        
         $RCUDSN    '#################..########..########..D#####..T###X
               ###',FIELDS=(PREFIX,DBD,DSG,DATE,RTIME),                 X
               TYPE=IC1,STKIC=Y,GDG=N                                    
*                                                                        
*======================================================================*
*      IMAGE COPY PROTOTYPE - COPY 1, STACKED IC, AND A GDG            *
*======================================================================*
*                                                                        
         $RCUDSN    '###############..#######..########',               X
               FIELDS=(PREFIX,DBD,DSG),                                 X
               TYPE=IC1,STKIC=Y,GDG=Y                                    
*                                                                        
*======================================================================*
* PROTOTYPE FOR ANY OTHER IMAGE COPY (PREVIOUS IC PROTOTYPES NOT USED) *
*======================================================================*
*                                                                        
         $RCUDSN    '###############..#######..########..####',         X
               FIELDS=(PREFIX,DBD,DSG,TYPE),                            X
               TYPE=IC                                                   
*                                                                        
         $RCUDSN   EXIT                                                  
         END                                                             
*


  • The first prototype format is used if the data set is a change accumulation and a member of a GDG: GDG=Y.
  • The second prototype format is used if the data set is a change accumulation but not a member of a GDG: GDG=N.
  • The third prototype format is used if the data set name is an incremental image copy data set, stacking of the output image copies is requested, and the data set is not a member of a GDG: TYPE=IC1, STKIC=Y, GDG=N.
  • The fourth prototype format is used if the data set is an incremental image copy data set, stacking of the output image copies is requested, and the data set is a member of a GDG: TYPE=IC1, STKIC=Y, GDG=Y.
  • The fifth prototype is used if the data set is an incremental image copy data set and stacking is not requested: TYPE=IC.
  • If none of the prototypes are selected, the Data Set Name user exit returns to the main task with a RC=8. The main task indicates that the change accumulation or incremental image copy for which the exit was invoked is disabled.

In the following example, the Data Set Name user exit generates data set names for all types of change accumulation and image copy data sets (stacked, nonstacked; GDG, non-GDG; and copy 1 through copy 10).

CAP$DSN CSECT
*======================================================================*
* CHANGE ACCUM PROTOTYPE - ANY CA COPY AND A GDG *
*======================================================================*
$RCUDSN '#####################..####..########', X
FIELDS=(PREFIX,TYPE,CAGRP), X
TYPE=CA,GDG=Y
*======================================================================*
* CHANGE ACCUM PROTOTYPE - ANY CA COPY AND NOT A GDG *
*======================================================================*
$RCUDSN '#####################..####..########..D#####..T###X
###',FIELDS=(PREFIX,TYPE,CAGRP,DATE,RTIME), X
TYPE=CA,GDG=N
*
*======================================================================*
* IMAGE COPY PROTOTYPE - COPY 1, STACKED IC, AND NOT A GDG *
*======================================================================*
*
$RCUDSN '#################..########..########..D#####..T###X
###',FIELDS=(PREFIX,DBD,DSG,DATE,RTIME), X
TYPE=IC1,STKIC=Y,GDG=N
*
*======================================================================*
* IMAGE COPY PROTOTYPE - COPY 1, STACKED IC, AND A GDG *
*======================================================================*
*
$RCUDSN '###############..#######..########’, X
FIELDS=(PREFIX,DBD,DSG), X
TYPE=IC1,STKIC=Y,GDG=Y
*
*======================================================================*
* PROTOTYPE FOR ANY OTHER IMAGE COPY (PREVIOUS IC PROTOTYPES NOT USED) *
*======================================================================*
*
$RCUDSN '###############..#######..########..####’, X
FIELDS=(PREFIX,DBD,DSG,TYPE), X
TYPE=IC
*
$RCUDSN EXIT
END
*

The following figure shows an example of an exit routine that handles data set naming for data set group or area data sets.

*= + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + =*
*   SAMPLE ICP$DSN EXIT TO HANDLE VOLCOPY(Y)                          *
*= + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + =*
*
ICP$DSN  CSECT
         $RCUDSN   ENTRY
         CLC   SEQ,=C'001'
         BH    VOLCOPY
*
*=====================================================================*
*   PROTOTYPE FOR STACKED OUTPUT DATA SETS THAT ARE NOT GDG'S         *
*=====================================================================*
ICSTK    DS        0H
         $RCUDSN   '#################..########..########..D#####..T###X
               ###',FIELDS=(PREFIX,DBD,DSG,DATE,RTIME),                X
               TYPE=IC,STKIC=Y,GDG=N
*
*=====================================================================*
*   PROTOTYPE FOR NON-STACKED OUTPUT, OR FOR GDG'S                    *
*=====================================================================*
ICGDG    DS        0H
         $RCUDSN   '#################################..########',      X
               FIELDS=(PREFIX,DBD),                                    X
               TYPE=IC,STKIC=N
*
*=====================================================================*
*   PROTOTYPE FOR 2ND AND SUBSEQUENT EXTENTS OF VOLCOPY(Y) OPERATION  *
*=====================================================================*
VOLCOPY  DS        0H
         $RCUDSN   '#################################..########..S###',X
               FIELDS=(PREFIX,DBD,SEQ),                                X
               TYPE=IC,STKIC=N
*
         $RCUDSN   EXIT
         END

The example in the following figure shows assembler coding used as part of the $RCUDSN macro. The second prototype includes a user-defined literal string, OFFSIT, in the generated data set name. A field offset reference, TYPE+2, completes the generated data set name.

*====================================================================*
*  THIS EXAMPLE SHOWS NORMAL ASSEMBLER CODING                        *
*  INCORPORATED INTO THE DATA SET NAME EXIT ROUTINE.                 *
*  NOTE THAT THE TESTS PERFORMED BY THE 'CLC' INSTRUCTIONS ARE NOT   *
*  NECESSARY; THE SAME RESULTS CAN BE ACHIEVED BY PROTOTYPE CODING.  *
*  'CLC' IS USED HERE FOR ILLUSTRATION PURPOSES, ONLY!               *
*====================================================================*
RCU$DSN  CSECT                                                         
         $RCUDSN  ENTRY                                                
         CLC   TYPE(3)=C'CA1'      IS THIS FOR CA1?                    
         BE    CA1NAME             YES - BRANCH                        
         CLC   TYPE(2),=C'CA'      IS THIS FOR ANY OTHER CHG ACCUM     
         BE    OTHER               YES - BRANCH                        
         B     XITPGM              BRANCH TO EXIT - NO PROTOTYPE USED  
*                                  THIS WILL CAUSE RC8                 
*====================================================================*
*     PROTOTYPE FOR CHANGE ACCUMULATION                              *
* NOTE: THE 'CLC' INSTRUCTION AFTER THE ENTRY STATEMENT CAUSES A     *
* BRANCH TO THIS LOCATION IN THE ASSEMBLER CODE.                     *
*====================================================================*
CA1NAME  DS    OH
         $RCUDSN  '####################..#####..####..########',      X
               FIELDS=(PREFIX,JOB+3,TYPE,CAGRP)                        
         B     XITPGM                                                  
*====================================================================*
*     PROTOTYPE FOR ANY 'OTHER' CHANGE ACCUMULATION (CA2 - CA10)     *
* NOTE: THE 2ND 'CLC' INSTRUCTION AFTER THE ENTRY STATEMENT CAUSES A *
* BRANCH TO THIS LOCATION IN THE ASSEMBLER CODE.                     *
*
* THIS CONSTRUCTS A DSN WITH THE FORMAT 'PREFIX.CAGRP.OFFSIT_',      *
* WHERE '_' IS 2-10 (DERIVED FROM THE LAST DIGIT(S) OF 'TYPE')       *
*====================================================================*
OTHER    DS    OH
         $RCUDSN  '####################..########..OFFSIT##',         X
               FIELDS=(PREFIX,CAGRP,TYPE+2)                            
*====================================================================*
*     RETURN TO CHANGE ACCUMULATION PLUS                             *
*====================================================================*
XITPGM   DS    OH
         $RCUDSN  EXIT
         END


Related topic


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

CHANGE ACCUMULATION PLUS 5.1