Setting build and link options

Use build and link options when you build and link a z/OS® UNIX subproject or individual source files by using actions that are not based on make. When you build or link a subproject or file, you can select one of the available sets of build and link options that you want to use.

About this task

You can use the Build and Link Options preference page to define different sets of build and link options to include in target environment definitions. A set of build and link options includes the build and link options for C/C++ and HLAsm files.

Using the Build and Link Options preference page, you can do the following tasks:
  • Create a set of build and link options.
  • Rename an existing set of build and link options.
  • Remove an existing set of build and link options.
  • Import a set of build and link options from another location.
  • Export a set of build and link options to another location.
  • Configure a set of build and link options.
Tip: The &TENV substitution variable returns the name of the target environment. You can use the &TENV variable in the Build and Link Options preference page to redirect the output from your build to a directory specific to the selected target environment. You can also use the &TENV substitution variable in any of the preference pages where substitution variables are allowed. This substitution variable is useful when you want to build a z/OS UNIX subproject for multiple target environments and generate your output for each target environment in a different directory.

Creating a set of build and link options

Procedure

To define a set of build and link options, complete the following steps:

  1. In the Preferences window, navigate to z/OS Solutions > z/OS UNIX Subprojects > Target Environments > Build and Link Options.
  2. Click New.
    The New Build and Link Options window opens.
  3. In the Name field, type the name of the build and link options set that you want to create.
    Tip: Assign a meaningful name to each set of build and link options, such as Debug Build Options for System A or Production Build Options for System B, to easily identify them when you create a target environment definition.
  4. From the list, select the build and link options that supply the initial settings for the set that you are creating.
  5. To save your selections and close the window, click OK.
    The name that you assigned to the new set of build and link options is displayed in the list of available sets.

What to do next

You can now configure this set of build and link options.

Renaming a set of build and link options

About this task

You can modify the name of an existing set of build and link options.

Procedure

  1. From the list of available build and link options sets, select the set that you want to rename.
  2. Click Rename.
    The Rename Build and Link Options window opens.
  3. Type the new name that you want to apply to this set of build and link options.
  4. To save your changes and close the window, click OK.
    The new name is displayed in the list of available sets of build and link options. All references to this build and link option set are updated to use this new name.

Removing a set of build and link options

About this task

You can remove a set of build and link options from the list of available option sets. You cannot remove a set of build and link options that is referenced by an existing target environment definition. In this case, Delete is disabled.

Procedure

  1. From the list of available build and link options sets, select the set that you want to remove.
  2. Click Delete.
    The Delete Confirmation window opens.
  3. Click OK.
    The selected set is removed from the list of available sets of build and link options.

Importing a set of build and link options

About this task

You can import a set of build and link options that is stored in another location into the list of available sets in the Build and Link Options preference page.

Procedure

  1. Click Import.
    The Import Build and Link Options window opens.
  2. Do one of the following actions:
    • In the File field, type the name of the file that contains the build and link options that you want to import.
    • To browse for the location of the file that you want to import, click Browse.
  3. Optional: If any of the sets of build and link options that you want to import have the same name as a set that exists in your workspace, select Overwrite existing definitions.
    This option overwrites the existing set of options with the imported set.
  4. Click OK.
    If you selected the Overwrite existing definitions check box, the Confirm Overwrite window opens. Do one of the following actions:
    • To complete the import and overwrite any existing sets of options, click OK.
    • To cancel the import and not overwrite existing sets of options, click Cancel. You can use the Import Build and Link Options window to modify your selections.

    If you did not select Overwrite existing definitions and a set by the same name exists, the selected definitions are not imported. An error message is displayed to indicate any definitions that are not imported because of a conflict after the import is complete.

Exporting a set of build and link options

About this task

You can export a set of build and link options from the Build and Link Options preference page to another location.

Procedure

  1. From the list of available build and link options sets, select the set that you want to export to another location.
  2. Click Export.
    The Export Build and Link Options window opens.
  3. Do one of the following actions:
    • In the File field, type the name of the file that you want to export the build and link options to.
    • To browse for the location of the file that you want to export the build and link options to, click Browse.
  4. In the Select items to export section, select the check box for each set of build and link options that you want to export.
  5. To export your selections and close the window, click OK.

Configuring a set of build and link options

About this task

To configure a set of build and link options, complete the following steps:

Procedure

  1. From the list of available build and link options sets, select the set that you want to configure.
    The current settings for this set of build and link options are displayed.
  2. You can configure the following options for each set of build and link options:
    • Remote Assemble
    • Remote Compile
    • Link Options
    The Build and Link Options preference page contains a set of tabs that you can use to configure each of these options. For details on setting these options, see the related topics.