Generating a user macro definition file

If you have many user macros, you may wish to generate the user macro file, rather than inputting the macros individually. You can use the generateHLAsmMacroFile.sh server script file to generate a macro definition file.

About this task

The macro generation script creates a basic macro file. It includes all the macros that are found, along with positional and keyed parameters. It does not parse the macro files for advanced syntax such as checking for required vs optional parameters, nor does it generate any parameter relationships or parameter values.

To generate a user macro definition, complete the following steps:

Procedure

  1. On the server, ensure that the rse.env script is in your current path or that the $RSE_CFG variable is set to point at the rse.env file.
  2. Ensure that the generateHLAsmMacroFile.sh script is in your path.
    Note: The script is usually found in the same location as the RSE host modules in the bin folder.
  3. Run the script using the appropriate parameters:
    generateHLAsmMacroFile -filename -macroPath [-verbose]
    Table 1. Parameters
    Parameter Value
    -filename <macrofile>

    Required.

    The file that will contain the macro definitions can be one of the following files:
    • z/OSĀ® UNIX file name
    • PDS member name
    • Sequential data-set name
      Note: If the macro file exists, it will be replaced.
    -macroPath <path>

    Required.

    The path to search for macros. Separate items with a colon (:)

    The path may include:
    • z/OS UNIX directory name
    • PDS name
    [-verbose]

    Optional

    Displays additional information messages during processing, in addition to detailed error messages when errors are encountered.

    Table 2. Return codes
    Value Description
    0 Macro generation was successful.
    -1 A parameter to the generation script is missing or was incorrectly specified.
    -2 The macro file specified is not valid, or a problem occurred while reading a item in the macro path.
    -3 An error occurred during generation.
    -4 An MVS related error occurred.