IBM Support

Creating and using macros in IBM Rational SDL Suite

Question & Answer


Question

How to create and use a macro in IBM Rational SDL Suite?

Answer

In Rational SDL, a macro is a form of text substitution. In a macro definition, a collection of lexical units is defined. A macro call indicates where the text from the macro definition body is to be included.

In order to use a macro in a SDL System first they have to be created and then called. Attached is a sample for reference.

  • Creating a macro
    1. In the Organizer, Select Edit -> Add New
    2. Highlight SDL and select Macro from the drop down menu.
    3. Key in a name in the field New Document Name and hit OK. This will create a .smc file which will store the SDL macro definition.
    4. Open the .smc file and write a macro definition as shown below:


  • Calling a macro:
  • Macros can be called only using the Macro call symbol in the process diagram.

    Note that graphical macro calls are not allowed in a higher scope than process (system, block, etcetera). Also calling a macro using a task symbol is not possible.

    To analyze a system containing a macro, turn the Macro expansion button on to order expansion of SDL macros through Generate -> Analyze.

    After macros are expanded, the .pr file is used as input and expanded into a .prm file, which includes the SDL macros in an expanded form.





MacroExample.zip
[{"Product":{"code":"SSYR86","label":"Rational SDL Suite"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"General Information","Platform":[{"code":"PF033","label":"Windows"}],"Version":"6.3","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

More support for:
Rational SDL Suite

Software version:
6.3

Operating system(s):
Windows

Document number:
129897

Modified date:
23 June 2018

UID

swg21408449