DataStore routing during IMS shutdown


When you stop an IMS system by issuing the /CHE command, IMS Connect transactions might be sent to that IMS system. IMS Connect might not recognize that IMS is unavailable until the IMS system disconnects from the Cross-system Coupling Facility (XCF) group. Transactions that have been routed to the IMS system are not processed or rejected, causing timeout or RSM messages for the remote client.

If you issue the STOP DATASTORE command before issuing the /CHE command, transaction responses might get trapped within the IMS system. This happens because these responses do not have the datastore path available to return to IMS Connect, so the remote client receives a timeout message. In the scenario, we recommend that you suspend message routing as described in this topic.

Suspending message routing

Use one of the following methods to suspend message routing before you issue the STOP DATASTORE and /CHE commands:

You can perform either method via the Energizer ISPF interface. You can issue the SET ROUTER INACTIVE command also via the Batch utility.

Energizer then routes inbound messages to the next available datastore and returns the corresponding responses to the IMS Connect clients. The messages sent to the datastore with suspended routing are processed by the next available datastore. New messages are not routed to the datastores with suspended routing.

Note

The SET ROUTER INACTIVE command affects routing set inEnergizer only.

OTMA processes messages sent to it before you issued the SET ROUTER INACTIVE command that have not yet returned a response (inflight messages) and the corresponding responses are returned to the IMS Connect clients.

Resuming message routing

After you restart (cold start or emergency restart) the IMS system and all datastores become available, perform one of the following step, depending on how you suspended message routing:

To suspend message routing by using the ISPF interface

  1. Navigate to the Energizer Commands - DataStores panel.
    For information about how to navigate to the panel, see Issuing-Energizer-commands.
  2. Identify the datastores associated with the IMS system that you plan to shut down.
  3. Perform one of the following actions and press Enter:
    • Set the identified datastore to INACTIVE (option 6 on the panel).
    • Set the router load weight to zero (option 7 on the panel).
  4. Verify that message routing is suspended by checking the -Display Stats Summary(DS) Id(*) field (option 3 on the panel).
  5. Issue the /CHE command to shut down the IMS system.
  6. After the maintenance or similar task is complete, restart the IMS system.
  7. To resume message routing, perform one of the following actions and press Enter:
    • Set the inactive datastore to ACTIVE (option 5 on the panel).
    • Set the router load weight to an appropriate value (option 7 on the panel).

To suspend message routing by using the Batch utility

Use the IPRTCPIC member located in the BMCSAMP library to issue IMS and Energizer commands in batch mode. The sample JCL member IPR#REXX to execute the IPRTCPIC member is available in the BMCCNTL library.

  1. For the datastores associated with the IMS system that you plan to shut down, follow these steps:
    1. Create a set of batch jobs that issue the SET ROUTE command to make a datastore INACTIVE. Use the following JCL in the IMS shutdown procedure:

      //DSINACT  EXEC PGM=IKJEFT01,DYNAMNBR=100                                 
      //SYSPROC  DD DISP=SHR,DSN=<yourCLISTLibrary> BMCSAMP                        
      //SYSTSPRT DD SYSOUT=*                                                   
      //SYSTSIN  DD *
      %IPRTCPIC HOST:PORT# MSGID(-IPRCMD-)  -                                  
              -SET ROUTER TYPE(DS) ID(<datastoreName>) STATE(INACTIVE) FORMAT                                           
    2. Create a set of batch jobs that issue the SET ROUTE command to make a datastore ACTIVE. Use the following JCL in the IMS startup procedure:

      //DSACT    EXEC PGM=IKJEFT01,DYNAMNBR=100                                 
      //SYSPROC  DD DISP=SHR,DSN=<yourCLISTLibrary> BMCSAMP                        
      //SYSTSPRT DD SYSOUT=*                                                   
      //SYSTSIN  DD *
      %IPRTCPIC HOST:PORT# MSGID(-IPRCMD-)  -                                  
              -SET ROUTER TYPE(DS) ID(<datastoreName>) STATE(ACTIVE) FORMAT      
    3. Create a set of batch jobs that issue the SET ROUTE command to set the router load weight to a value from 0 through 100. Use the following JCL in the IMS startup and shutdown procedures:

      //DSLOAD0  EXEC PGM=IKJEFT01,DYNAMNBR=100                                 
      //SYSPROC  DD DISP=SHR,DSN=<yourCLISTLibrary> BMCSAMP                        
      //SYSTSPRT DD SYSOUT=*                                                   
      //SYSTSIN  DD *
      %IPRTCPIC HOST:PORT# MSGID(-IPRCMD-)  -                                  
              -SET ROUTER TYPE(DS) ID(<datastoreName>) LOAD(<nn>) FORMAT              
  2. Run the jobs that suspend message routing.
  3. Issue the /CHE command to shut down the IMS system.
  4. After the maintenance or similar task is completed, restart the IMS system.
  5. Run the jobs that resume message routing.

Routing status and statistics summary

You can see the routing status and related statistics from the Energizer ISPF interface or via running a job.

On the Energizer Commands - DataStores panel, type 1 and press Enter to display the routing status. A sample output is shown in the following figure:

-DISPLAY ROUTER TYPE(DS) ID(*)                                          
                                                                       
BMCIPA1010I OUTPUT FROM ORIGIN SYSTEM SD5DLCON@IMSA                     
BMCIPA1011I  ROUTER CONFIGURATION: SD5DR15   FROM: 09/29/20-12:05       
BMCIPA1011I  AFFINITY MANAGEMENT IS:        ACTIVE                      
BMCIPA1011I  LOAD BALANCING IS:             ACTIVE   STATISTICAL        
BMCIPA1011I  DISPLAY STATE CHANGE MESSAGES: NO                          
BMCIPA1011I  OVERRIDE IRM TIMER:               0.01  SECS.              
BMCIPA1011I  WARN STATE WEIGHT MULTIPLIER:  50%                         
BMCIPA1011I  DATASTORE STATE CHANGE TIMER:  00:01:00 (HH:MM:SS)         
BMCIPA1011I  ROUTING CYCLE STARTED: 23:41:11  CYCLE TIME: 00:01:00      
BMCIPA1011I  DATASTORE WEIGHT %GOAL    #MSGS  %MSGS   STATUS            
BMCIPA1011I  SD4A          0     0         0      0   ROUTING INACTIVE  
BMCIPA1011I  SD5D         33    50         0      0   AVAIL             
BMCIPA1011I  TEST         33    50         0      0   AVAIL             
BMCIPA1099I COMMAND PROCESSING COMPLETE                                 
 Complete status Message - Flags:  IPRCMD RC=0                           

For the datastore SD4A, the router load weight is 0 and the routing status is inactive. For the datastores SD5D and TEST, the routing status is active.

Use the following JCL to generate the sample output:

//DSLOAD0    EXEC PGM=IKJEFT01,DYNAMNBR=100                                 
//SYSPROC  DD DISP=SHR,DSN=<yourCLISTLibrary> BMCSAMP                        
//SYSTSPRT DD SYSOUT=*                                                   
//SYSTSIN  DD *
%IPRTCPIC HOST:PORT# MSGID(-IPRCMD-)  -                                  
        -DISPLAY ROUTER TYPE(DS) ID(*) FORMAT

On the Energizer Commands - DataStores panel, type 3 and press Enter to display the statistics summary. A sample output is shown in the following figure:

-DISPLAY STATS SUMMARY(DS) ID(*)                                                                
BMCIPA1010I OUTPUT FROM ORIGIN SYSTEM SD5DLCON@IMSA                                             
BMCIPA1011I STATISTICS LAST RESET ON: 09/29/20 AT: 10:14:13 (OR LATER IF INDICATED BY *)        
BMCIPA1011I          --RATE (MSGS/SECOND)---  INPUT   --INPUT MESSAGE SIZE --                   
BMCIPA1011I DATASTOR CURRENT  RECENT    PEAK MESSAGES AVERAGE MINIMUM MAXIMUM ERRORS            
BMCIPA1011I -------- ------- ------- ------- -------  ------- ------- ------- ------            
BMCIPA1011I SD5D    *   0.00    0.00    1.20    287      105     105     105      0             
BMCIPA1011I TEST    *   0.00    0.00    1.40    290      105     105     105      0             
BMCIPA1011I SD4A    *   0.00    0.00    0.60     23      105     105     105      0             
BMCIPA1011I SD5A    *   0.00    0.00    0.00      0        0       0       0      0             
BMCIPA1099I COMMAND PROCESSING COMPLETE                                                         
 Complete status Message - Flags:  IPRCMD RC=0                                                   

The value 0 in the CURRENT column for each datastore indicates that there are no incoming messages.

Use the following JCL to generate the sample output:

//DSLOAD0    EXEC PGM=IKJEFT01,DYNAMNBR=100                                 
//SYSPROC  DD DISP=SHR,DSN=<yourCLISTLibrary> BMCSAMP                        
//SYSTSPRT DD SYSOUT=*                                                   
//SYSTSIN  DD *
%IPRTCPIC HOST:PORT# MSGID(-IPRCMD-)  -                                  
        -DISPLAY STATS SUMMARY(DS) ID(*) FORMAT 

 

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