Space announcement

   

This space provides the same content as before, but the organization of the home page has changed. The content is now organized based on logical branches instead of legacy book titles. We hope that the new structure will help you quickly find the content that you need.

SmartSwitch feature

The SmartSwitch feature lets you take advantage of the Next Generation Technology Unload for DB2 for z/OS (NGT Unload) product without changing your existing UNLOAD PLUS JCL. SmartSwitch dynamically "switches" jobs from UNLOAD PLUS to NGT Unload, based on NGT Unload capabilities and the rules that you specify to comply with your business needs. With SmartSwitch, you can enhance performance by exploiting a mixture of UNLOAD PLUS and NGT Unload functions.

This topic contains the following sections:

Licensing requirements

To use SmartSwitch, the following conditions must exist:

  • You are using version 11.2.00 of UNLOAD PLUS.
  • You are using version 11.2.00 or 12.1.00 of NGT Unload.
  • You have a license to use at least one of the following BMC solutions:
    • BMC High Speed Utilities for DB2
    • BMC Performance for DB2 Databases
    • BMC High Speed Unload-Load for DB2

Note

These solutions also give you access to Workbench for DB2 product functions, which you will use to set up and manage SmartSwitch rules.

Tip

SmartSwitch switches to NGT Unload more often with version 12.1.00 than with version 11.2.00 because version 12.1.00 contains additional features (for example, OUTPUT statement support). Therefore, although SmartSwitch is compatible with version 11.2.00 of NGT Unload, BMC recommends upgrading to version 12.1.00 as soon as possible.

How SmartSwitch works

SmartSwitch dynamically switches jobs from UNLOAD PLUS to run on NGT Unload based on rules that you create in a rules table using the Workbench for DB2 product.

To enable SmartSwitch, you need to perform the following tasks:

  1. Making SmartSwitch available
  2. (recommended) Configuring parameters
  3. Setting up a SmartSwitch rules table
  4. Adding a SmartSwitch view

When you have performed these tasks, you add rules to a rules table. For more information, see Adding and managing SmartSwitch rules.

SmartSwitch then performs the following tasks:

  1. Sorts the rules according to their level of restrictiveness

    Rule sorting is important, because it determines the order in which SmartSwitch checks jobs against the rules. For more information, see Rule sorting.

  2. Checks a job against the rules in the rules table in descending order, and determines whether to switch the job to NGT Unload

    For more information, see Rule checking.

For more information about switching, see How the switch occurs.

Rule sorting

When you add rules to a rules table, SmartSwitch performs a column-by-column search of the rules from left to right and sorts them in descending order according to their level of restrictiveness.

A column value's restrictiveness is defined as follows: 

Type of value Example Level of restrictiveness
A fully qualified column value EMPLOYEE Most restrictive
Qualified characters and a wildcard character EMPLOY% Less restrictive
Only a wildcard character % Least restrictive

The least restrictive possible rule is as follows:

LPAR  SSID  AUTHID   DBNAME    SPNAME    OBJTYPE  UTILITY  RULE
------------------------------------------------------------------------
%     %     %        %         %         ALL      ALL      <rule>

Note

Specifying the least restrictive column values and ALLOW_NGT allows switching to NGT Unload for all jobs. The only exception is if those products do not support running a given job. For more information about rule checking, see Rule checking.

If the LPAR column values are different, SmartSwitch places the rule with the more restrictive LPAR column value above the rule with the less restrictive LPAR column value. If the values are identical, SmartSwitch performs the same comparison on the SSID column, and so on, until all rules are sorted in descending order.

Examples

In the following rules table, the first rule is more restrictive than the second rule: in the SPNAME column, the value for the first rule is fully qualified, and the value for the second rule contains a wildcard character.

LPAR  SSID  AUTHID   DBNAME    SPNAME    OBJTYPE  UTILITY  RULE
------------------------------------------------------------------------
SYSB  DB2P  RDARKB%  EMPLOYEE  PAYROLL   ALL      ALL      ALLOW_NGT
SYSB  DB2P  RDARKB%  EMPLOYEE  PAY%      ALL      ALL      FORCE_CLASSIC

Again, in the next rules table, the first rule is more restrictive than the second rule: in the DBNAME column, the value for the first rule is fully qualified, and the value for the second rule contains a wildcard character. This is true even though, in the SPNAME column, the value for the first rule is less restrictive than the value for the second rule, because the DBNAME column precedes the SPNAME column.

LPAR  SSID  AUTHID   DBNAME    SPNAME    OBJTYPE  UTILITY  RULE
------------------------------------------------------------------------
SYSB  DB2P  RDARKB%  EMPLOYEE  %		 ALL      ALL      ALLOW_NGT
SYSB  DB2P  RDARKB%  EMP%      PAY%      ALL      ALL      FORCE_CLASSIC

Rule checking

When you run a job, SmartSwitch checks the job against the rules in the rules table in descending order, looking for the first possible match.  

Based on the checking process, one of the following results appears in the BMCHIST table:

Result Description
FORCE_CLASSIC UNLOAD PLUS runs the job or, if unable to run the job, terminates with an error message
ALLOW_NGT SmartSwitch switches the job to NGT Unload if both of the following conditions are satisfied:
  • NGT Unload supports the DB2 object types in the job.
  • NGT Unload supports the functions in the job.
NGTGO (PTF BQU1367 applied) SmartSwitch would have switched the job to NGT Unload if you had selected the ALLOW_NGT rule. However, because you selected the REPORT_NGT rule, UNLOAD PLUS processes the job. For information about the REPORT_NGT rule, see REPORT_NGT rule.
NGTNOGO (PTF BQU1367 applied) SmartSwitch would not have switched the job to NGT Load if you had selected the ALLOW_NGT rule. UNLOAD PLUS processes the job.
  • If the job does not match any rules in the rules table, or the rules table contains no rules, SmartSwitch uses the following implied rule and determines that UNLOAD PLUS should execute the job:

    LPAR  SSID  AUTHID   DBNAME    SPNAME    OBJTYPE  UTILITY  RULE
    ------------------------------------------------------------------------
    %     %     %        %         %         ALL      ALL      FORCE_CLASSIC
  • If NGT Unload cannot run the job, SmartSwitch determines that the classic utility should run the job with a message confirming this determination. 

    For more information, see Limitations.

    Example

    NGT Unload cannot currently load XML tables. If you are running a job that contains an XML table, SmartSwitch determines that UNLOAD PLUS should run the job, even if the matching rule specifies ALLOW_NGT. If a future enhancement enables NGT Unload to load XML tables, SmartSwitch will then switch the job to NGT Unload in this situation.  

    For more information about switching, see How the switch occurs

(PTF BQU1367 applied) REPORT_NGT rule

You can test whether SmartSwitch would switch a classic utility job to the corresponding NGT product without actually performing the switch. This enables you to see how many jobs would successfully switch to the NGT products if you selected the ALLOW_NGT rule.

To use this feature:

  1. Ensure that you installed NGT Unload and the NGTSS is running.
  2. In Workbench for DB2, enter REPORT_NGT in the Rule column of the SmartSwitch rules table. This rule behaves in the same way as the ALLOW_NGT rule except that it does not cause the NGT product to process the job.

In all cases, the contents of the COMMENT column for the matching rule is displayed in a message and in UNLOAD PLUS's SYSPRINT.

The following flowchart summarizes the rule-checking process:

 

Examples

These examples are based on the following rules table:

LPAR  SSID  AUTHID   DBNAME    SPNAME    OBJTYPE  UTILITY  RULE
------------------------------------------------------------------------
SYSB  DB2P  RDARKB%  EMPLOYEE  PAYROLL   ALL      ALL      ALLOW_NGT
SYSB  DB2P  RDARKB%  EMPLOYEE  PAY%      ALL      ALL      FORCE_CLASSIC
%     %     %        EMPLOYEE  %         ALL      REORG    ALLOW_NGT
%     %     %        EMP%      BENE%     ALL      LOAD     ALLOW_NGT
  • This example assumes that RDARKB or RDARKB% is running the reorganization.
  • If you reorganize table space EMPLOYEE.PAYROLL on LPAR SYSB in SSID DB2P, the job switches to NGT because it matches the first rule. Although your reorganization also satisfies the second rule (which specifies FORCE_CLASSIC), the first rule takes precedence because it is more restrictive than the second rule.
  • If you reorganize table space EMPLOYEE.PAYHIST on LPAR SYSB in SSID DB2P, the job does not switch to NGT because it matches the second rule.

 How the switch occurs

The process of switching a job from UNLOAD PLUS to NGT Unload typically involves more than simply copying the UNLOAD PLUS syntax to NGT Unload. In most cases, UNLOAD PLUS performs the following steps:

  1. Parses the job commands in the SYSIN and builds new syntax that is compatible with NGT Unload
  2. Places the new syntax in internal classic-utility control blocks
  3. Merges any option module specifications into these control blocks as if you had specified the specifications in the syntax

SmartSwitch output

SmartSwitch output can combine output from UNLOAD PLUS and NGT Unload, depending on whether SmartSwitch switches a job to NGT Unload

  • If SmartSwitch switches a job to NGT Unload, output is written to CDBPRINT, SYSERROR, SUMMARY, and OBJREPRT DD statements (the norm for NGT output), as it is for other NGT Unload output. NGT Unload dynamically allocates these DD statements, using SYSPRINT as a model.
  • If SmartSwitch does not switch a job to NGT Unload, the UNLOAD PLUS continues to write output to SYSPRINT (the norm for UNLOAD PLUS). The UNLOAD PLUS also issues UTILITY COMPLETE messages and a final condition code.

The following table displays sample messages that are displayed in various scenarios:

Scenario Sample message

The following message is displayed in SYSPRINT:

BMC54002I	SMARTSWITCH BLUE SOLUTION LICENSE NOT FOUND
  • SmartSwitch is enabled.
  • The rules table does not contain any rules.
BMC50004I  UTILINIT PHASE COMPLETE.  ELAPSED TIME = 00:00:00
BMC54003I  SMARTSWITCH RULE: FORCE_CLASSIC  COMMENT: SMARTSWITCH NOT ACTIVATED, NO ROWS ON POLICY TABLE

The following message is also displayed in the Comments column of the rules table: 

SMARTSWITCH NOT ACTIVATED, NO ROWS ON POLICY TABLE
  • SmartSwitch is enabled.
  • The rules table contains at least one rule.
  • The job does not match any of the rules in the rules table.
BMC50004I UTILINIT PHASE COMPLETE.  ELAPSED TIME = 00:00:00
BMC54003I SMARTSWITCH RULE: FORCE_CLASSIC  COMMENT: SMARTSWITCH IS ACTIVATED, BUT NO RULE APPLIES. CLASSIC UTILITY WILL BE USED
BMC50004I NGTUTIL PHASE COMPLETE.  ELAPSED TIME = 00:00:00

The following message is also displayed in the Comments column of the rules table: 

SMARTSWITCH IS ACTIVATED, BUT NO RULE APPLIES. CLASSIC UTILITY WILL BE USED
  • SmartSwitch is enabled.
  • The job matches a rule that contains ALLOW_NGT.
BMC50004I UTILINIT PHASE COMPLETE.  ELAPSED TIME = 00:00:00
BMC54003I SMARTSWITCH RULE: ALLOW_NGT  COMMENT: SEND JOBS FROM RDARKB TO NGT
BMC50186I SMARTSWITCH SYNTAX VERIFICATION RC=00000000 :  NGT CAN NATIVELY PROCESS THIS LOAD. 
BMC50184I SMARTSWITCH PROCESSING SUCCESSFUL. RETURN CODE=0.  UTILITY OUTPUT CAN BE FOUND IN NGT DD CDBPRINT, SUMMARY AND OBJREPRT. 

The following message is also displayed in the Comments column of the rules table: 

SEND JOBS FROM RDARKB TO NGT
  • SmartSwitch is enabled.
  • The job matches a rule that contains ALLOW_NGT.
  • The job cannot switch from UNLOAD PLUS to NGT Unload.
BMC50004I UTILINIT PHASE COMPLETE.  ELAPSED TIME = 00:00:01
BMC54003I SMARTSWITCH RULE: ALLOW_NGT  COMMENT: SEND JOBS FROM RDARKB TO NGT 
BMC50183I SMARTSWITCH PRECLUDED FROM SWITCHING.  REASON DDTYPE LOCPFCPY FOUND WITH IFALLOC USE 
BMC50004I NGTUTIL PHASE COMPLETE.  ELAPSED TIME = 00:00:00 

Message BMC50183I describes the reason preventing the job from switching from the UNLOAD PLUS to NGT Unload.

  • SmartSwitch is enabled.
  • The job matches a rule that contains ALLOW_NGT.
  • The NGT parser prevents the job switching from UNLOAD PLUS to NGT Unload.
BMC50004I UTILINIT PHASE COMPLETE.  ELAPSED TIME = 00:00:00
BMC54003I SMARTSWITCH RULE: ALLOW_NGT  COMMENT: SEND JOBS FROM RDARKB TO NGT
BMC50186I SMARTSWITCH SYNTAX VERIFICATION RC=00000008 :  LOAD PARSER ERROR: NGTU782 TEXT IN ERROR IS: PAUSE RESUME NO SHRL
BMC50004I NGTUTIL PHASE COMPLETE.  ELAPSED TIME = 00:00:01 

Message BMC50186I describes the reason preventing the job from switching from UNLOAD PLUS to NGT Unload.

The full reason for the switch not occurring is described in the SYSERROR DD statement. For example:

MAIN.LD900PAR NGTU782 TEXT IN ERROR IS: PAUSE RESUME NO SHRL
MAIN.LD900PAR NGTU783 REASON FOR ERROR: PARAMETER IS NOT RECOGNIZED.
MAIN.LD900PAR NGTU783 FOR SUB KEYWORD : PRELOAD.
MAIN.LD900PAR NGTU784 EXPECTED TOKENS FOLLOWS:
MAIN.LD900PAR NGTU785 "LOAD","CONTINUE".
MAIN.RRGSRTNS NGTZ170 ERROR OCCURRED IN STATEMENT NUMBER 1 

In this example, the user specified PRELOAD PAUSE in the LOAD statement.

  • SmartSwitch is enabled.
  • The job matches a rule that contains ALLOW_NGT.
  • The UNLOAD PLUS can execute the job only by invoking DSNUTILB.
  • The NGT parser prevents the job switching from UNLOAD PLUS to NGT Unload.
BMC50004I UTILINIT PHASE COMPLETE.  ELAPSED TIME = 00:00:00
BMC50182I DSNUTILB REQUIRED: INDEX CONTAINS A RANDOM KEY INDEX 'RKB '.'RKBUTSCR '
BMC54003I SMARTSWITCH RULE: ALLOW_NGT  COMMENT: SEND JOBS FROM RDARKB TO NGT
BMC50186I SMARTSWITCH SYNTAX VERIFICATION RC=00000008 :  REORG PARSER ERROR: NGTU781 SYNTAX ERROR OCCURRED AT STATEMENT NO. 1
BMC50004I NGTUTIL PHASE COMPLETE.  ELAPSED TIME = 00:00:01
DSNU000I    108 17:45:46.99 DSNUGUTC - OUTPUT START FOR UTILITY, UTILID = RKBRSSW1

In this example, the user used a DEADLINE keyword in the SYSIN that triggered the NGT parser error.

  • SmartSwitch is enabled.
  • The job matches a rule that contains ALLOW_NGT.
  • The UNLOAD PLUS can execute the job only by invoking DSNUTILB.
  • The NGT parser determines that the job can switch from UNLOAD PLUS to NGT Unload.
BMC50004I UTILINIT PHASE COMPLETE.  ELAPSED TIME = 00:00:00
BMC50182I DSNUTILB REQUIRED: INDEX CONTAINS A RANDOM KEY INDEX 'RKB '.'RKBUTSCR '
BMC54003I SMARTSWITCH RULE: ALLOW_NGT  COMMENT: SEND JOBS FROM RDARKB TO NGT
BMC50186I SMARTSWITCH SYNTAX VERIFICATION RC=00000004 :  NGT CAN PROCESS THIS REORG BY INVOKING DSNUTILB
BMC50004I NGTUTIL PHASE COMPLETE.  ELAPSED TIME = 00:00:01

In this example, the job switches to the NGT product, but because there was an index in RBDP status, NGT Unload in turn invokes DSNUTILB.

Ability to bypass SmartSwitch

You can set a new default options module (DOPTS) option, SMARTSWITCH, to bypass SmartSwitch altogether. UNLOAD PLUS performs a single one-bit test initially. If you have specified SMARTSWITCH=NO to bypass SmartSwitch, the classic utility notifies you that SmartSwitch has been bypassed, and no subsequent SmartSwitch processing occurs.

Note

If you do not specify SMARTSWITCH=NO, the default is to enable SmartSwitch as described in this notice. You do not need to reassemble and link option modules to enable SmartSwitch.

Also, SmartSwitch is automatically bypassed in the following cases:

  • UNLOAD PLUS is running in a worklist (for example, in the CHANGE MANAGER, CATALOG MANAGER, or DASD MANAGER PLUS product). 
  • SYSPRINT is allocated to a data set.
  • You are using version 11.2.00 of NGT Unload to run an unload that includes an INTO statement.

Making SmartSwitch available

For information about making SmartSwitch available, see Technical bulletin — The new SmartSwitch feature can dynamically switch jobs from the classic utilities to the NGT products .

Configuring parameters

To make NGT Unload behave similarly to UNLOAD PLUS, BMC recommends that during NGT configuration you specify "plus" parameters in the UTLPARMS, ULDPARMS, LODPARMS, and RRGPARMS DD statements as follows:

Recommended parameters in the UTLPARMS DD statement

Parameter Default setting Recommended setting
+CHECKDEFERRED YES NO
+CLEANUP NO NO
+COPYPENDING YES Same as the COPYPEND default options module (DOPTS)
+DELETEWORK YES Same as the DELFILE DOPTS
+DRAIN1 ALL Same as the DRAINTYP DOPTS
+DSCRL 100,100 Same as the STOPDELAY or STOPRETRY DOPTS
+DSNUTILB YES Same as the DSNUTILB DOPTS
+EDPROCSUB NO Same as the UXSTATE DOPTS
+FASTSWITCH YES Same as the FASTSWITCH DOPTS
+HRECALL NO YES
+JOURNAL NO ONERROR
+OVERRIDEOUTPUT NO NO
+PSWDWTO NO YES
+QRETRY 2000,10 Same as the DRNDELAY or DRNRETRY DOPTS
+RACFID None Similar to the OPNDB2ID DOPTS
+SQLID None Same as the the BMCSYSADM DOPTS
+SVRMODE E I (utilizes internal servers only) 1
+SYSINERROR ABEND STOP
+XBMID None Same as the XBMID DOPTS (for NGT Copy)

1  This setting causes all NGT product processing to be performed within a single address space, but could have a negative impact on NGT product performance.


Recommended parameters in the ULDPARMS DD statement

Parameter Default setting Recommended setting
+BLANKPAD YES NO
+DATEFMT ISO DECP
+TIMEFMT ISO DECP


Recommended parameters 
in the LODPARMS DD statement

Parameter Default setting Recommended setting
+AFTERACC RW NO
+ALLO USED KEEPDB2
+COMMIT -1 Same as the APCOMMIT DOPTS
+PAD YES NO
+SETCHECKPEND YES Same as the CHECKPEND DOPTS
+WRITETO A B


Recommended parameters 
in the RRGPARMS DD statement

Parameter Default setting Recommended setting
+ALLO USED KEEPDB2
+BEFOREACC None UT
+IGNDEFNO None YES
+MINTSSIZE None 0

Setting up a SmartSwitch rules table

For each subsystem, use the following procedure to set up the SmartSwitch rules table and alias. This procedure uses sample DDL that is supplied by the DB2 Utilities Common Code PTF BQU0257.

  1. Copy the sample DDL from the D2USAMP library member D2USSDDL added by PTF BQU0257.
  2. In the copy, you can replace the variables (identified by angle brackets) with your own values.   

    Observe the following guidelines: 

    Line in the sample DDL Value Guideline
    1 Database The default value is the database in which other BMC table spaces (for example, BMCUTIL and BMCSYNC) are located. If you selected another database during installation, specify that database in the sample DDL.
    3 Table space BMC strongly recommends that you do not change the default value.
    3 Buffer pool You can specify your own value (provided that the buffer pool size is 4K).
    6 and 35 Storage group You can specify your own value.
    8 Table space creator Do not change the default value.
    32 Index BMC strongly recommends that you do not change the default values.
    39, 42, and 45 Constraints Do not change the default values.
    48 Alias for Workbench for DB2

    The alias qualifiers are Axx112D, the Installation System defaults for each of the NGT products. If you changed the qualifier of product synonyms when you installed UNLOAD PLUS, specify that qualifier value.

    The alias creator must be the qualifier used during installation. It is the same as the qualifier used for the synonym definitions for the BMCUTIL and BMCSYNC tables. Do not change the alias creator values.

    54 Alias for UNLOAD PLUS

Sample DDL

CREATE DATABASE <databaseName>;  
 
  CREATE TABLESPACE <tableSpaceName> IN <databaseName> BUFFERPOOL <bufferPool>         
     COMPRESS NO  MAXPARTITIONS  1 SEGSIZE 4 CCSID EBCDIC               
     MAXROWS 255 FREEPAGE 10 PCTFREE 10 DSSIZE 4G                       
     USING STOGROUP <storageGroup> PRIQTY -1 SECQTY -1;                                                                                               
                                                                        
  CREATE TABLE <tableSpaceCreator>.<tableSpaceName>                                    
  (LAST_UPD_TIMESTAMP TIMESTAMP   NOT NULL WITH DEFAULT                 
  ,LAST_UPD_USERID    CHAR(8)     NOT NULL WITH DEFAULT USER            
                                  FOR SBCS DATA                         
  ,SCHEMA_VERSION     SMALLINT    NOT NULL WITH DEFAULT 1               
  ,LPAR               CHAR(8)     NOT NULL WITH DEFAULT '%'             
                                  FOR SBCS DATA                         
  ,SSID               CHAR(8)     NOT NULL WITH DEFAULT '%'             
                                  FOR SBCS DATA                         
  ,AUTHID             CHAR(8)     NOT NULL WITH DEFAULT '%'             
                                  FOR SBCS DATA                         
  ,DBNAME             CHAR(8)     NOT NULL WITH DEFAULT '%'             
                                  FOR SBCS DATA                         
  ,SPNAME             CHAR(8)     NOT NULL WITH DEFAULT '%'             
                                  FOR SBCS DATA                         
  ,OBJTYPE            CHAR(3)     NOT NULL WITH DEFAULT 'ALL'           
                                  FOR SBCS DATA                         
  ,UTILITY            CHAR(8)     NOT NULL WITH DEFAULT 'ALL'           
                                  FOR SBCS DATA                         
  ,RULE               CHAR(16)    NOT NULL WITH DEFAULT 'FORCE_CLASSIC' 
                                  FOR SBCS DATA                         
  ,COMMENT            VARCHAR(256) WITH DEFAULT FOR SBCS DATA)          
  IN <databaseName>.<tableSpaceName>;                                                             
                                                                        
  CREATE UNIQUE INDEX <indexSpaceCreator>.<indexSpaceName> ON <indexSpaceCreator>.<tableSpaceName>   
        (LPAR   DESC, SSID    DESC, AUTHID  DESC, DBNAME  DESC          
        ,SPNAME DESC, OBJTYPE DESC, UTILITY DESC  )                     
      CLUSTER  USING STOGROUP <storageGroup> PRIQTY -1 SECQTY -1            
               ERASE NO FREEPAGE 10 PCTFREE 10 PIECESIZE 4G;       
                                                                        
  ALTER  TABLE BMCUTIL.CMN_BMCSWITCH                                    
      ADD CONSTRAINT SMARTSWITCH_RULE_TEXT                              
          CHECK (RULE IN ('FORCE_CLASSIC','ALLOW_NGT'));                
  ALTER  TABLE BMCUTIL.CMN_BMCSWITCH                                    
      ADD CONSTRAINT SMARTSWITCH_UTILITY_NAME                           
          CHECK (UTILITY IN ('UNLOAD','REORG','LOAD' ,'ALL'));          
  ALTER  TABLE BMCUTIL.CMN_BMCSWITCH                                    
      ADD CONSTRAINT SMARTSWITCH_OBJECT_TYPE                            
          CHECK (OBJTYPE IN ('PBG','ALL'));                      
                                                                        
  CREATE ALIAS ACT112D.BMC_BMCSMARTSWITCH FOR <tableSpaceCreator.tableSpaceName>;    
                                                                        
  CREATE ALIAS ADU112D.BMC_BMCSMARTSWITCH FOR <tableSpaceCreator.tableSpaceName>;    
                                                                        
  CREATE ALIAS AMU112D.BMC_BMCSMARTSWITCH FOR <tableSpaceCreator.tableSpaceName>;    
                                                                        
  CREATE ALIAS ARU112D.BMC_BMCSMARTSWITCH FOR <tableSpaceCreator.tableSpaceName>;    

Adding a SmartSwitch view

To work with SmartSwitch rules, you must add a SmartSwitch view in the Workbench for DB2 product. Use the following procedure to add a SmartSwitch view.

  1. Open or create a Workbench workspace.

    For more information, see the BMC Workbench for DB2 User Guide.

  2. In the Products Tools perspective, click the Add View menu arrow ,  Add Rule, and then Add SmartSwitch view

    Product Tools is not displayed by default. There are two ways to make Product Tools appear:

    • Select the Workbench Advanced layout when you create the workspace

    • Click the Layout button, select Product Tools, and click OK

  3. Click  Add SmartSwitch view.

    Tip

    You can also right-click in the navigation pane to select this action.

    The default value of the Add View menu is always the last option that you created. 

  4. Select a DB2 connection by using either of the following methods:
    • Type the full or partial name of a DB2 connection to select the first subsystem that matches this value in the list of favorite connections.

    • Use the menu arrow to select from your list of favorite connections.

      Tip

      You can add DB2 connections to your list of favorite connections by clicking and specifying which connections to include.

  5. In the View name field, enter a meaningful name for this SmartSwitch view, or accept the default name.

  6. Click OK.

    The new view is listed in the navigation pane, and the results pane displays a rules table for the designated subsystem. Any existing rules for that subsystem are also displayed.

    Tip

    In the table, the rules are displayed in the default order in which SmartSwitch evaluates them.  

    You can sort the table according to the column headers. Clickto restore the rules to the default order.

  7. Click  to save the workspace.

    You can now add, edit, copy, delete, and deploy SmartSwitch rules, as explained in Managing SmartSwitch rules.  

Adding and managing SmartSwitch rules

You can perform the following tasks in the Workbench product to add and manage SmartSwitch rules:

To perform these tasks, ensure that you satisfy the Licensing requirements.

Adding rules

Use Workbench and the following procedure to add a rule to a rules table. Workbench verifies that your specified values use valid syntax.

For more information about adding rules in Workbench, view the Quick Course  Setting up DB2 Utility SmartSwitch .

Tip

To reduce overhead, BMC recommends that you keep the number of rules to a minimum, based on your business needs.

  1. In the Product Tools perspective, select a SmartSwitch view.

    The results pane displays a rules table for the selected SmartSwitch view.

    Note

    You can click to refresh the rules table whenever you want. If you have not saved your changes, Workbench prompts you to confirm the action.
  2. In the tool bar, click Add Rule.

    Tip

     You can also right-click in the results pane to select this action.  
  3. In the Add SmartSwitch dialog box, complete all of the fields to define the rule. (Blank fields are not supported.) 

     The following guidelines apply to using masked field values:

    • The first character can be A-Z, @, #, or $.
    • Remaining characters can be A-Z, 0-9, @, #, or $.
    • The last character can be %, in addition to  A-Z, 0-9, @, #, or $.

    The following table contains more information about the fields:

    Field Description
    LPAR

    The name of the LPAR to which the rule applies

    This column supports masked values.

    Subsystem

    The ID of the DB2 subsystem to which the rule applies

    This column supports masked values.

    Auth ID

    The authorization ID of the submitter of the rule

    This column supports masked values.

    Database

    The name of the database to which the rule applies

    This column supports masked values.

    Space Name

    The name of the table space or index space to which the rule applies

    This column supports masked values.

    Object Type

    The type of object to which the rule applies

    Possible values are:

    • (default) ALL
    • PBG

    Note: If a specific object type causes problems in NGT Unload, you can specify that type here and specify the FORCE_CLASSIC rule. Subsequently, any jobs containing that object type will not switch to NGT Unload.

    Utility

    The specific utility to which the rule applies

    Possible values are:

    • UNLOAD
    • REORG
    • LOAD
    • ALL
    Rule

    The rule that SmartSwitch applies to a job that matches the conditions specified in the other fields.

    Possible values are FORCE_CLASSIC, ALLOW_NGT, and (if PTF BQU1367 is applied) REPORT_NGT. For more information about these values, see Rule checking.

    Comment

    (optional) Free-form text

    You can use this column to document what you expect the rule to achieve, or any other information.

    Last update user

    The last time the rule was updated

    Workbench automatically generates this value.

    Last update time

    The ID of the user who last updated the rule

    Workbench automatically generates this value.

  4. Click OK.

    Workbench adds the rule to the rules table.

    Note

    When you save a rule, all lowercase letters are converted to uppercase.
  5. In the tool bar, click Save changes .

Editing rules

Use the following procedure to edit an existing rule rule in a rules table.

  1. In the Product Tools perspective, select the SmartSwitch view that contains the rule or rules that you want to edit.

  2. From the results pane, select a rule, and click 

    Tip

    You can also right-click in the results pane to select this action.
  3. In the Edit SmartSwitch Rule dialog box, edit the rule.

    For more information, see Step 3 of Adding rules.

  4. Click OK.

    is displayed next to the edited rule.

  5. Continue selecting and editing, as needed.

    Tip

    Before saving, you can discard your changes by selecting a rule and clicking .
  6. In the tool bar, click Save changes .

    SmartSwitch updates the rules in the rules table.

Copying rules

Use the following procedure to copy an existing rule and edit it in a rules table.

  1. In the Product Tools perspective, select the SmartSwitch view that contains the rule or rules that you want to copy.

  2. From the results pane, select a rule, and click 

    Tip

    You can also right-click in the results pane to select this action.
  3. Edit the copied rule.

    For more information, see Editing rules.

  4. Click OK.

    Workbench adds the rule to the rules table.

    Note

    Workbench validates the rule and does not let you save a rule that contradicts or duplicates an existing rule.
  5. In the tool bar, click Save changes .

Deleting rules

Use the following procedure to delete a rule in a rules table.

  1. In the Product Tools perspective, select a SmartSwitch view.

  2. From the results pane, click .

     is displayed at the beginning of each selected rule.

  3. Continue until you are ready to save your changes to the rules.
  4. Click Save changes .

Redeploying rules by using an existing deployment view

Use the following procedure to redeploy SmartSwitch deployment rules that have already been defined in a deployment view. For example, you might have corrected a DB2 issue that previously prevented the rules from being deployed.

Note

This procedure is available only if you are using version 12.1.00 of Workbench. It is not available if you are using version 11.2.00 of Workbench.

  1. In the Product Tools perspective, select a SmartSwitch deployment view from the navigation pane.

    The results pane is populated with the Rule List and Results tabs. 

  2. Click Deploy rules.
  3. Select one or more DB2 subsystem connections to which you want to deploy the rules.
  4. Click Next.
  5. In the Rules list, select one or more rules that you want to deploy.

    Tip

    You can toggle between  to clear all rules and  to select all rules from the list.

  6. Click Finish.
  7. (optional) Click Reportto save the deployment report in a folder of your choice.

SmartSwitch considerations for ON FAILURE (PTFs BQU2055 and BQU2056 applied)

If the SmartSwitch feature switches the job from UNLOAD PLUS to Next Generation Technology Unload for DB2 for z/OS, a single ON FAILURE ALL TERMINATE UTILITY statement passes to NGT Unload with the highest assigned return code. When multiple ON FAILURE TERMINATE UTILITY statements are present, UNLOAD PLUS functions as described in the "Multiple statements" section of the ON FAILURE topic.

Return code values from UNLOAD PLUS pass to NGT Unload as shown in the following table:

UNLOAD PLUS return code Return code passed to NGT Unload
Less than 5 5
5 through 15 5 through 15
Greater than 15 15


SmartSwitch converts all ON FAILURE TERMINATE UTILITY RETCODE integer statements into one ON FAILURE ALL TERMINATE UTILITY RETCODE integer statement and sends it to NGT Unload. SmartSwitch also converts the value to +CLEANUP(YES,returnCode) for use in NGTSSJCL/NGTSSSYN. When the JCL formed in NGTSSJCL is executed under PGM=NGTUTIL, +CLEANUP(YES,returnCode) overrides the ON FAILURE ALL TERMINATE UTILITY RETCODE integer value. For more information, see +CLEANUP .

Limitations

SmartSwitch is subject to the following limitations in the following cases:

  • Version 11.2.00 of NGT Unload cannot process UNLOAD PLUS jobs that include:

    • An OUTPUT command to allocate the SYSREC data set
    • An INTO statement
  • Version 11.2.00 of NGT Unload cannot process UNLOAD PLUS jobs that contain:
    • Multiple SELECT statements

    • The FORMAT UNLOAD option

      This option is incompatible with FORMAT STANDARD in NGT Unload. If you are using the FORMAT option in UNLOAD PLUS, you must specify either DSNTIAUL or STANDARD.

Troubleshooting

If SmartSwitch fails when attempting to switch a job from UNLOAD PLUS to NGT Unload, resubmit the original UNLOAD PLUS JCL with the UNLOAD PLUS restart parameter:

  • If NGT Unload can run the failed job, SmartSwitch automatically translates the restart parameter specified in the UNLOAD PLUS PARM= clause to be NGT compatible, as follows:

    UNLOAD PLUS parameter NGT Unload parameter
    Null RESTART
    NEW NORESTART
    RESTART RESTART
    NEW/RESTART RESTART
    NEW/RESTART(PHASE) RESTART
    TERM QUICKEXIT
  • If NGT Unload cannot run the failed job, UNLOAD PLUS runs the job.

Was this page helpful? Yes No Submitting... Thank you

Comments