z/OS MVS Programming: Authorized Assembler Services Reference ALE-DYN
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Conventional list form macros

z/OS MVS Programming: Authorized Assembler Services Reference ALE-DYN
SA23-1372-00

With conventional list form macros, you can use the macro forms as follows:
  1. Use the list form of the macro, which expands to the parameter list. Place the list form in the section of your program where you keep non-executable data, such as program constants. Do not code it in the instruction stream of your program.
  2. In the instruction stream, code a GETMAIN or a STORAGE macro to obtain some virtual storage.
  3. Code a move character instruction that moves the parameter list from its non-executable position in your program into the virtual storage area that you obtained.
  4. For macros that have a modify form, you can code the modify form of the macro to change the parameter list. Use the address parameter of the modify form to reference the parameter list in the virtual storage area that you obtained. Thus, the parameter list that you change is the one in the virtual storage area obtained by the GETMAIN or STORAGE macro.
  5. Invoke the macro by issuing the execute form of the macro. Use the address parameter of the execute form to reference the parameter list in the virtual storage area that you obtained.

With this technique, the parameter list is safe even if the first task is interrupted and a second task intervenes. When the program runs under the second task, it cannot access the parameter list in the virtual storage of the first task.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014