Assembler support incorporates a number of macros and SVCs (supervisor calls). Those that are supported are, in general, not compatible with the equivalent macros and SVCs on the mainframe, so wherever possible, use macros to get the desired SVC function.
Some macro options are not fully supported in that they do compile, but have no effect when executed. There are also some macros which are supported in stub form, that is, macro code exists but it simply returns control to the calling program. These stubs are provided for macros that perform tasks that have no meaning on the PC. An example stub macro is provided in %ProgramFiles(x86)%\Micro Focus\Enterprise Developer\include\stub.mac; you can use this to create your own stub macros.
There are two categories of macro:
Many Assembler services macros equate to SVCs. You can choose whether to code the macro or its equivalent SVC, but in general it is easier to use the macros. The following table relates the SVCs and service macros:
SVC | Macro | Description |
---|---|---|
4 | GETMAIN L LC LU E EC EU, VC, VU | Get memory (list, element and variable requests). |
5 | FREEMAIN L LC LU E EC EU, VC, VU | Free memory (list, element and variable requests). |
6 | LINK | Link to another Assembler program. |
8 | LOAD | Load another Assembler program or a COBOL program. |
9 | DELETE | Delete a loaded module. |
10 | GETMAIN R | Get memory (R type register requests). |
11 | TIME | Get the time of day and the date. |
13 | ABEND | Terminate the program and open the Assembler debugger if possible, or display information about the state of the program when the abend occurred. |
14 | SPIE | Handle a program exception within the executing module. |
26 | CATALOG and LOCATE | Uncatalog a data set; return a volume list for a data set. |
29 | SCRATCH | Delete a data set. |
35 | WTO WTOR | Display a message on the screen. Display a message on the screen and wait for a reply. |
39 | LINKC2 | Link to a COBOL program. |
41 | IDENTIFY | Associate a name you specify with an already loaded program. |
62 | Remove the executing program. There is no corresponding macro. | |
99 | DYNALLOC | Allocate or deallocate a resource at execution time. |
103 | XLATE | Convert between ANSI and EBCDIC. |
120 | GETMAIN RU, RC, VRC, VRU; FREEMAIN R, RU, RC, VRC and VRU; STORAGE | Get memory (RU and RC type register requests) Free memory (all types of register requests). Get memory or free memory |
CALL | Transfer control to a statically linked module. There is no corresponding SVC. | |
CAMLST | Create parameter list for CATALOG, LOCATE or SCRATCH. There is no corresponding SVC. | |
DEQ | Relinquish control of one or more serially reusable resources. There is no corresponding SVC. | |
ENQ | Request control of one or more serially reusable resources. There is no corresponding SVC. | |
EXTRACT | Obtain information from control block. There is no corresponding SVC. | |
RETURN | Restore registers and sets the address to return to. There is no corresponding SVC. | |
SAVE | Save registers. There is no corresponding SVC. | |
SPLEVEL | Test or set the level of MVS macro compatibility. There is no corresponding SVC. | |
WAIT | Wait for event completion. There is no corresponding SVC. |