BMC AMI Unload user exits


BMC AMI Unload allows you to further customize your unload processing through a user-written exit routine.

BMC AMI Unload supports exit routines written in Assembler. The exit routine is invoked when you supply the module name and program type with the UNLOADEXIT option of the UNLOAD command statement.

BMC AMI Unload passes every output record to your routine before the record is written to the unload data set. The exit routine can inspect, modify, or discard records before BMC AMI Unload writes them to the unload data set.


Important

When you specify FORMAT EXTERNAL, BMC AMI Unload correctly formats a BMC-AMI-Unload-BIGINT value using 20 characters (not 19 characters, as in UNLOAD PLUS for Db2).

Requirements

BMC AMI Unload user exits have the following requirements:

  • If the exit resides in your system’s LINKLIST, in your job's JOBLIB, or in your job step's STEPLIB, the load library must be APF authorized.
  • Your exit routine must be reentrant.
  • Your exit routine must be written in Assembler.

Restrictions

The following restrictions apply when using user-written exit routines with BMC AMI Unload:

  • The user-written exit routine must not modify the length of a record passed to the exit.
  • BMC AMI Unload passes 128-byte areas for the table creator and table name parameters to user-written exit routines. If you use an exit that depends on the table creator or table name that BMC AMI Unload passes, ensure that your exit allows for 128-byte creator and table names.
  • If you specify FORMAT CSV, ensure that you use unique characters for the following keywords and that they do not conflict with any character data to be unloaded:

    • An ENCLOSEDBY character (typically, the double-quote character)
    • A TERMINATEDBY character (typically, the comma character) 

    If the character data to be unloaded contains a character matching an ENCLOSEDBY or TERMINATEDBY character, BMC AMI Unload presents incorrect data to the BMC AMI Unload user-written exit.  

    BMC AMI Unload passes the addresses and lengths of the data values found by scanning the generated CSV string for any ENCLOSEDBY or TERMINATEDBY characters.

  • Attempting to specify UNLOADEXIT and FORMAT DELIMITED results in a syntax error. 
  • Attempting to specify UNLOADEXIT and SPANNED YES results in a syntax error.
  • Attempting to specify ROWEXIT (on UNLD or UNLOAD) results in a syntax error.

The following topics describe user-written exit routines that you can use to customize your unload processing:

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*