This documentation supports the 20.08 (12.1) version of BMC Discovery.To view an earlier version of the product, select the version from the Product version menu.

Mainframe template example


You can download the Mainframe template file using the template link.

// This module contains example patterns based on the Mainframe pattern
// templates.
//
// THIS IS FOR EXAMPLE USE ONLY
//

tpl 1.16 module Mainframe.Examples;

metadata
  origin := "ONLINE_DOCS";
end metadata;

from SupportingFiles.Mainframe.Support import MainframeModel 3.0;


pattern Mainframe_TapeDrive 1.0
'''
  This pattern creates a Storage node for all TapeDrives.
'''


  overview
    tags IBM, TapeDrive;
  end overview;

  constants
   filter := "";
  end constants;

  triggers
    on result_list := DiscoveredMainframeViewResultList
                      where discovery_method = "getTapeDrive";
  end triggers;

  body
    MainframeModel.createTapeStorage(result_list, filter);
  end body;

end pattern;


pattern Mainframe_DASD 1.0
'''
  This pattern creates a Storage node for DASD Drives with a volume_id
  beginning with AL.
'''


  overview
    tags IBM, DASD;
  end overview;

  constants
   filter := "^AL";
  end constants;
 
  triggers
    on result_list := DiscoveredMainframeViewResultList
                      where discovery_method = "getDiskDrive";
  end triggers;
 
  body
    MainframeModel.createDiskStorage(result_list, filter);
  end body;

end pattern;


pattern Mainframe_Transaction 1.0
'''
  This pattern creates a Detail node for all Transactions with a name
  beginning with CICSTRAN-C.
'''


  overview
    tags IBM, Transaction;
  end overview;

 constants
   filter := "^CICSTRAN-C";
    create_programs := false;
  end constants;
 
  triggers
    on result_list := DiscoveredMainframeViewResultList
                      where discovery_method in ["getCICSTransaction",
                                                "getIMSTransaction"];
  end triggers;
 
  body
    MainframeModel.createTransactions(result_list, filter, create_programs);
  end body;

end pattern;


pattern Mainframe_MQ 1.0
'''
  This pattern creates a Detail node for all MQDetails with a name
  beginning with MQCHNL-.
'''


  overview
    tags IBM, MQ;
  end overview;
 
  constants
   filter := "^MQCHNL-";
  end constants;

  triggers
    on result_list := DiscoveredMainframeViewResultList
                      where discovery_method in ["getMQQueue",
                                                "getMQChannel",
                                                "getMQListener"];
  end triggers;
 
  body
    MainframeModel.createMQDetails(result_list, filter);
  end body;

end pattern;

 

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