Writing the exit in HLASM

The following considerations apply to writing the exit in HLASM:

  • There is currently no sample exit written in HLASM. You will have to write this yourself.
  • Use the HLASM register save, call and return macros provided by Language Environment®. The caller code in File Manager is LE-enabled and assumes the callee is LE enabled.
  • Use argument 1, referred to in the sample COBOL program as RAM-WORK-AREA-PTR, in all the calls to the exit so that File Manager remembers the address of your root block of storage. You can set this to any value and File Manager will remember it and provide it back to your exit on every call.
  • Get memory during the INIT-RAM call and free all memory during the TERM-RAM call.
  • Use the TEST sample COBOL program to call your HLASM exit routine and test it outside of File Manager.