User programming exits

ACIF provides these sample programming exits so you can customize the program:

  • Input record
  • Index record
  • Output record
  • Resource

The exits are described in the following sections. Sample AIX or Windows C language headers are shown in the topic for each programming exit.

Using the programming exits is optional. You specify the names of the exit programs with the INPEXIT, INDXEXIT, OUTEXIT, and RESEXIT parameters. (These parameters are lowercase in AIX and Windows.) Each of these parameters is described in ACIF parameters.

Note: If ACIF receives a nonzero return code from any exit program, ACIF issues message 0425-412 and stops processing.

ACIF provides the sample code for AIX or Windows exits in the AIX directory /usr/lpp/psf/acif/ or the Windows directory \install_directory\exits\acif\. Microsoft Visual C++ project (*.dsp) and workspace (*.dsw) files are also provided in the Windows directory. The sample exits are:

apkinp.c
Input record exit that removes No Operation (NOP) structured fields
apkind.c
Index record exit
apkout.c
Output record exit
apkres.c
Resource exit

In addition, ACIF provides these AIX or Windows user input record exits to translate input data streams:

apka2e.c
Converts ASCII stream data to EBCDIC stream data. You can also convert encoded data to another coded character set identifier (CCSID) if you specify the INPCCSID and OUTCCSID parameters.
asciinp.c
Converts unformatted ASCII data that contains carriage returns and form feeds into a record format that contains an ANSI carriage control character. This exit encodes an ANSI carriage control character in byte 0 of every record.
asciinpe.c
Converts unformatted ASCII data into a record format as does asciinp.c; then, converts the ASCII stream data to EBCDIC stream data. You can also convert encoded data to another coded character set identifier (CCSID) if you specify the INPCCSID and OUTCCSID parameters.
dbblank.c
Processes EBCDIC double-byte line data that is downloaded from the z/OS spool. Adds an extra blank to the end of the input record if all of these specifications are true:
  1. The last byte in the record is a blank (X'40' in EBCIDIC).
  2. The second to the last byte is not a blank.
  3. The input record is line data rather than a structured field.

The record length is updated by one when the blank is added to the end of the input record.

    Note:
  1. The exit does not determine whether the data is DBCS, so the blank is added to all input records that meet the criteria. However, this exit must be used only if the spool file consists of double-byte data or mixed single-byte or double-byte data that has blank truncation. Adding a blank to other types of data files can cause formatting errors, depending on how the page definition is coded.
  2. The exit only checks for a single trailing blank. If the data contains a different number of odd blanks, the user must ensure that the data is formatted with the correct font.
  3. The exit assumes that the input and output data is EBCIDIC and, therefore, does not do any code page translation.

The C language header file for all AIX or Windows exit programs, apkexits.h, is also provided along with the build rules for the AIX user exits, Makefile.

For more information about compiling AIX or Windows user exit programs, see InfoPrint Manager for AIX: Procedures, G550-1066, InfoPrint Manager for Linux: Procedures, G550-20264, or InfoPrint Manager for Windows: Procedures, G550-1073.