244 IBM Content Manager OnDemand Guide
The apka2e exit
The apka2e exit translates data that is encoded in ASCII (code set IBM-850) into EBCDIC 
(code set IBM-037). If you are converting line data to AFP , consider converting the data to 
EBCDIC. A much wider selection of EBCDIC coded fonts is available than ASCII fonts. Many 
customers find that it is easier to use character sets and code pages that are supplied by IBM 
than to create their own character sets and code pages. To use these predefined EBCDIC 
coded fonts, the data must be in EBCDIC. 
When you use the apka2e exit, you must manually change your indexing parameters:
/SM590000Change an ASCII CPGID to an EBCIDIC CPGID; for example, change CPGID=850 to 
CPGID=500.
/SM590000Change the HEX codes for the triggers and index names from ASCII to EBCDIC. If you do 
not, you receive ACIF return code 16, which states that it cannot find trigger1 or any fields. 
We used a hex editor to determine the new EBCDIC values and typed them by keyboard edit 
into the parameter file. If you do not have a hex editor, you can find conversion tables on the 
Internet. 
For more information about how to update indexing parameters, see 11.2.6, “Debugging input 
user exit programs” on page 247.
The asciinp exit
The asciinp exit program is used when the data does not contain carriage controls. Instead, 
it contains “PC style” carriage returns and form feeds X'0D0A' and X'0D0C'. This program is 
provided by IBM. The program transforms the ASCII data stream into a format that contains a 
carriage control character in byte 0 of every record. 
The asciinp exit performs the following actions: 
/SM590000Inserts a new page command (X'31') at the top of the first page.
/SM590000Removes the ASCII carriage return (X'0D').
/SM590000Inserts an ASCII new line (X'20') carriage control at byte 0 of each line, except the first 
line on a new page.
/SM590000Replaces the ASCII form feed (X'0C') with an ASCII new page command (X'31').
/SM590000Leaves X'0A' in the file.
The asciinpe exit
The asciinpe exit combines the previous two exits. It converts the data from ASCII to 
EBCDIC and inserts EBCDIC carriage control characters. For full documentation about this 
sample program, see the asciinpe.c source code.
11.2.3  Index record exit
Use the index record exit to modify or ignore the records that ACIF writes in the index object 
file. The program, which is specified in the ACIF indxexit parameter, receives control before a 
record is written to the index object file. The user-written program can instruct ACIF to use the 
record, to not use the record, or to edit the record before the record is inserted into the index 
object file.
Note: Because the asciinp exit inserts carriage control characters in byte 0 of your 
document, and leaves X'0A', it changes the position of the triggers and fields. If you use 
this exit, you must add 1 to the column offsets for the triggers and fields.