Programming Interface Information

Invoking the binder program from another program

You can pass control to the binder from a program in one of two ways:
  1. As a subprogram, with the execution of a CALL macro instruction (after the execution of a LOAD macro instruction), a LINK macro instruction, or an XCTL macro instruction.
  2. As a subtask with the execution of the ATTACH macro instruction.

24-bit or 31-bit addressing can be used with any of these macros.

The syntax of the macros used to invoke the binder follows:

EP=bindername
Specifies a symbolic name of the binder. You use these names to invoke the binder for the indicated services:
IEWBLINK
Binds a program module and stores it in a program library. Alternative alias names are IEWL, LINKEDIT, HEWL, and HEWLH096.
IEWBLOAD
Binds a program module and loads it into virtual storage, but does not identify it. Upon return from IEWBLOAD,
  • Register 0 contains the entry point address of the loaded program. The high order bit is set for AMODE(31) or AMODE(ANY). The low order bit is set for AMODE(64). In addition, the top 32 bits of extended Register 0 are cleared for AMODE(64).
  • Register 1 contains the address of a two-word area containing the following information:
    • Word 1 contains the address of the beginning of the virtual storage occupied by the loaded program.
    • Word 2 contains the size in bytes of the virtual storage occupied by the loaded program.

Alternative alias names are IEWLOADR, HEWLOADR, and IEWLOAD.

IEWBLODI
Binds a program module, loads it into virtual storage, and identifies it to the system using the IDENTIFY macro. Upon return from IEWBLODI,
  • Register 0 contains the entry point address of the loaded program. The high order bit is set for AMODE(31) or AMODE(ANY). The low order bit is set for AMODE(64). In addition, the top 32 bits of extended Register 0 are cleared for AMODE(64).
  • Register 1 contains the address of an 8 byte field containing the module name used on the IDENTIFY macro.

Alternative alias names are IEWLOADI and HEWLOAD.

IEWBLDGO
Binds a program module, loads it into virtual storage, and executes it. Alternative alias names are IEWLDRGO, LOADER, and HEWLDRGO.
PARAM=(optionlist[,ddname list])
Specifies, as a sublist, address parameters to be passed from the program to the binder.
optionlist
Specifies the address of a variable-length list containing the options and attributes. This address must be provided even if no list is provided.

The option list must begin on a half-word boundary. The two high-order bytes contain a count of the number of bytes in the remainder of the list. If no options or attributes are specified, the count must be zero. The option list is free form, with each field separated by a comma. No blanks or zeros should appear in the list. See z/OS MVS Program Management: User's Guide and Reference for more information about processing and attribute options.

ddname list
Specifies the address of a variable-length list containing alternative ddnames for the data sets used during binder processing. If standard DD names are used, this operand can be omitted.

The DD name list must begin on a halfword boundary. The 2 high-order bytes contain a count of the number of bytes in the remainder of the list. Each name of less than 8 bytes must be left justified and padded with blanks. If an alternate ddname is omitted from the list, the standard name will be assumed. If the name is omitted within the list, the 8-byte entry must contain binary zeros. Names can be omitted from the end by merely shortening the list.

The sequence of the 8-byte entries in the ddname list is as follows:
Entry
Alternate Name For:
1
SYSLIN
2
Member name (the name under which the output module is stored in the SYSLMOD data set; this entry is used if the name is not specified on the SYSLMOD DD statement or if there is no NAME control statement)
3
SYSLMOD
4
SYSLIB
5
Not applicable
6
SYSPRINT or SYSLOUT
7-11
Not applicable
12
SYSTERM
13
SYSDEFSD
VL=1
Specifies that the sign bit is set to 1 in the last fullword of the address parameter list.

When the binder completes processing, a return code is returned in register 15. See "Binder return codes" in z/OS MVS Program Management: User's Guide and Reference for a list of return codes.

For more information on the use of these macro instructions and for the syntax of the CALL macro, see z/OS MVS Programming: Assembler Services Guide.

You must code optionlist and VL1 on CALL.

End Programming Interface Information