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 valueExampleLevel of restrictiveness
A fully qualified column valueEMPLOYEE Most restrictive
Qualified characters and a wildcard characterEMPLOY% 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:

ResultDescription
FORCE_CLASSICUNLOAD PLUS runs the job or, if unable to run the job, terminates with an error message
ALLOW_NGTSmartSwitch 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, 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:

ScenarioSample 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.
(PTF BQU2387 applied) BMC50200I SMARTSWITCH ALWAYS SENDS DELETEFILES TO NGT AND OVERRIDES +DELETEOUTPUT VALUE.

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

Use the following procedure to make SmartSwitch available:

  1. Apply the following DB2 Utilities Common Code (D2U) PTF and the PTFs for your products, depending on the version you are using:

    ProductVersionPTFFMID
    Solution Common Code (SCC)  11.1.00BPJ17231 ZSCCB10
    11.2.00
    12.1.00BPJ17271 ZSCCC10
    NGT products11.2.00BPU97842 ZUFAB20
    12.1.00BPU9790ZNGTC10
    BQU0101ZD2UB20
    DB2 Utilities Common Code (D2U)11.2.00BPU98143 ZD2UB20
    BQU02573  
    LOADPLUS11.2.00BPU9845ZAMUB20
    BQU01024
    REORG PLUS11.2.00BPU9846ZAEXB20
    BQU01034 ZARUB20
    UNLOAD PLUS11.2.00BPU9853  ZADUB20
    BQU01044

    1  If you do not apply this PTF, SmartSwitch is not enabled and the following message displayed in SYSPRINT: 

    BMC50185E  SMARTSWITCH TASK NAME TOKEN NOT FOUND RC=00000004

       If you do not apply this PTF and you are running version 11.2.00 of the NGT products, SmartSwitch is not enabled and the following message is displayed in SYSPRINT: 

    BMC54001I  SMARTSWITCH NOT SUPPORTED BY NGT V11.02.00 SPE LEVEL 00

    3  If you do not apply this PTF:

    • SmartSwitch is not enabled.
    • The following message is displayed in the JES log: 

      CSV003I  REQUESTED MODULE D2UPROXY NOT FOUND
    • An S806 abend occurs (but the job step does not fail).

      If you do not apply this PTF, SmartSwitch is not enabled.

    Tips

    BMC recommends using BMC Internet Service Retrieval (ISR) to obtain PTFs. For more information, see the maintenance topics in the Installation System documentation. 

    You can also obtain PTFs from eFix PTF Distribution Services (eFix) or from the support site. For information about eFix, see the online Help.

    If you have questions, contact Customer Support at 1 800 537 1813 (United States and Canada) or call your local support center.

  2. Ensure that:

    • The NGT products on your system are in the same STEPLIB as the classic utilities, or that the NGT products are otherwise available in your system's LINKLIST, JOBLIB, or STEPLIB. If not, the following message is displayed: 

      BMC54000I  SMARTSWITCH NOT SUPPORTED - NO NGT VERSION FOUND
    • CDBSS is active on all LPARs in the data sharing group. 

To reduce overhead, SmartSwitch performs the following actions:

  1. Verifies that the NGT products are available in your system's LINKLIST, JOBLIB, or STEPLIB
  2. Attempts to load the NGT version information module for each product. SmartSwitch is bypassed if the load fails, or if you did not apply the NGT PTF.


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

ParameterDefault settingRecommended setting
+CHECKDEFERREDYESNO
+CLEANUPNONO
+COPYPENDINGYESSame as the COPYPEND default options module (DOPTS)
+DELETEWORKYESSame as the DELFILE DOPTS
+DRAIN1ALLSame as the DRAINTYP DOPTS
+DSCRL100,100Same as the STOPDELAY or STOPRETRY DOPTS
+DSNUTILBYESSame as the DSNUTILB DOPTS
+EDPROCSUBNOSame as the UXSTATE DOPTS
+FASTSWITCHYESSame as the FASTSWITCH DOPTS
+HRECALLNOYES
+JOURNALNOONERROR
+OVERRIDEOUTPUTNONO
+PSWDWTONOYES
+QRETRY2000,10Same as the DRNDELAY or DRNRETRY DOPTS
+RACFIDNoneSimilar to the OPNDB2ID DOPTS
+SQLIDNoneSame as the the BMCSYSADM DOPTS
+SVRMODEEI (utilizes internal servers only) 1
+SYSINERRORABENDSTOP
+XBMIDNoneSame 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

ParameterDefault settingRecommended setting
+BLANKPADYESNO
+DATEFMTISODECP
+TIMEFMTISODECP


Recommended parameters 
in the LODPARMS DD statement

ParameterDefault settingRecommended setting
+AFTERACCRWNO
+ALLOUSEDKEEPDB2
+COMMIT-1Same as the APCOMMIT DOPTS
+PADYESNO
+SETCHECKPENDYESSame as the CHECKPEND DOPTS
+WRITETOAB


Recommended parameters 
in the RRGPARMS DD statement

ParameterDefault settingRecommended setting
+ALLOUSEDKEEPDB2
+BEFOREACCNoneUT
+IGNDEFNONoneYES
+MINTSSIZENone0

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 DDLValueGuideline
    1DatabaseThe 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.
    3Table spaceBMC strongly recommends that you do not change the default value.
    3Buffer poolYou can specify your own value (provided that the buffer pool size is 4K).
    6 and 35Storage groupYou can specify your own value.
    8Table space creatorDo not change the default value.
    32IndexBMC strongly recommends that you do not change the default values.
    39, 42, and 45ConstraintsDo not change the default values.
    48Alias 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.

    54Alias 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:

    FieldDescription
    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 (partition-by-growth)

    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 Report to 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 codeReturn code passed to NGT Unload
Less than 55
5 through 155 through 15
Greater than 1515


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 .

SmartSwitch considerations for multiple SYSREC data sets for partitioned objects (PTF BQU2358 applied)

SmartSwitch supports unloading partitions from a partitioned table space to separate SYSREC data sets. SmartSwitch always passes the UNLOADDNPFX keyword to NGT Unload. For more information about UNLOADDNPFX, see UNLOADDN for NGT Unload .

Notes

  • When unloading from a partition-by-growth (PBG) table space using dynamic allocation with symbolic variable &PART, SmartSwitch produces one SYSREC data set as opposed to UNLOAD PLUS, which produces one SYSREC data set per partition.
  • When unloading from an image copy using the INFILE keyword, SmartSwitch produces only one SYSREC data set.

  • When unloading using DIRECT NO, SmartSwitch does not recognize SYSREC1 or SYSREC01 unless they are specified using the UNLOADDN keyword.

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.

SmartSwitch tracking table (PTF BQU2215 applied)

The SmartSwitch tracking table (BMCSSTRACKING) provides information on jobs executed via SmartSwitch. The table lists the following information:

  • Whether a job run under the REPORT_NGT rule can switch from the classic utility to the NGT utility
  • Whether the job run under the ALLOW_NGT rule actually switched
  • The reason a job cannot or did not switch (if applicable)

You can use the options module SSREPORT parameter to control which jobs to track. There is no syntax override for the SSREPORT option. You can specify either of the following options:

  • (Default) REPORT_NGT tracks jobs that run under the REPORT_NGT rule only. If you run the job without specifying any value for SSREPORT, then the default value is REPORT_NGT.
  • ALL tracks all SmartSwitch jobs

The following table describes the contents of the BMCSSTRACKING table:

Column name

Data type

Description

INSERT_TIMESTAMP

TIMESTAMP

Time that the row was inserted (not the time that the job step ran)

SCHEMA_VERSION

SMALLINT

Reserved for future use

Currently, all rows contain a value of 1.

SSID

CHAR(08)

Subsystem ID to which the utility is connected

JOBNAME

CHAR(08)

Name of the job that is running

JOBID

CHAR(08)

Job ID (job number) of the job that is running

AUTHID

CHAR(08)

Authorization ID under which the job is running

STEP_NAME

CHAR(08)

Name of the step to which this row applies

STEP_PGM

CHAR(08)

Name of the program that was executed in this job step

UTILNAME

CHAR(08)

Name of the utility (UNLOAD, LOAD, or REORG) that is running

DBNAME

CHAR(08)

Name of the first database that the utility is processing

If the utility processes more than one database, only the first one is tracked.

SPNAME

CHAR(08)

Name of the first table space that the utility is processing

If the utility processes more than one table space, only the first one is tracked.

UTILIDCHAR(16)The utility ID being executed

SWITCHED

CHAR(01)

Indicates whether the job step switched or can be switched (Y) or not (N)

The rule that is in effect defines which information is returned about switching:

Rule in effect

Job step switches

ALLOW_NGT

Y means the job switched

N means the job did not switch

FORCE_CLASSIC

Always N (switching is not enabled)

REPORT_NGT

Y means the job can switch

N means the job cannot switch

RULE

CHAR(01)

Indicates the rule in effect:
  • A if the rule was ALLOW_NGT
  • F if the rule was FORCE_CLASSIC
  • R if the rule was REPORT_NGT

SYSERROR_MSG_01 –
SYSERROR_MSG_08

VARCHAR(132)

Includes any relevant error messages:
  • For SWITCHED=N under the rule ALLOW_NGT, the reason it did not switch to the NGT utility
  • For SWITCHED=N under the rule REPORT_NGT, the reason it could not switch to the NGT utility

For SWITCHED=Y and for SWITCHED=N under the rule FORCE_CLASSIC, the columns will be empty.


You can also add the SSREPORT options module parameter to your existing DOPTS module as follows:

  1. Edit the ADU$OPTS member in your hlq.UBMCCNTL data set. 
  2. Repeat the row with STOPRETRY=300. 
  3. Change STOPRETRY=300 to SSREPORT=REPORT_NGT, 
  4. Assemble the options.

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 parameterNGT Unload parameter
    NullRESTART
    NEWNORESTART
    RESTARTRESTART
    NEW/RESTARTRESTART
    NEW/RESTART(PHASE)RESTART
    TERMQUICKEXIT
  • If NGT Unload cannot run the failed job, UNLOAD PLUS runs the job.

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

Comments