IndexAFP command

IndexAFP creates page groups and index tags in a production AFP file and writes the output to another file. The page groups and index tags must be defined in an AFP Visual Environment control file. This command is available only if AFP Indexer is installed.

Format

IndexAFP  -c controlfile [ -cp codepage] [ -docIdx indexfile][ -fontMapDir fontmapdirectory] [ -formDef formdefinition]  -i inputfile [ -log] -o outputfile [ -resDir resourcedirectories] [ -resGrp resourcegroupfile] 
[ -stats][ -te triggerexit] [ -threads nn] [ -trace tracefile] [ -trclvl level] 
[ -ue userexit][ -version]

    Note:
  • Brackets indicate that the option is not required. Do not type any brackets when you enter the command.

Options

-c controlfile
The full path name of the AFP Visual Environment control file that contains the page group and index tag definitions. This option is required unless the -te option is specified.
-cp codepage
The default code page. This option is not required.
Values for codepage are:
IBM500
An EBCDIC code page (default).
IBM850
An ASCII code page.
-docIdx indexfile
The full path name of the document index file that you want AFP Visual Environment to create. Any existing data in the file is overwritten.
This option is not required. If it is not specified, the document index file is not created.
-fontMapDir fontmapdirectory
The full path name of the directory that contains customized font-mapping files, which override the default font-mapping files.
This option is not required. If it is not specified, only the default font-mapping files are used.
-formDef formdefinition
The full path name of the form definition that contains the active medium map for the first page in each page group. IndexAFP writes the name of the active medium map in the document index file, and IndexAFP includes the form definition in the resource group file.
This option is not required. If this option is not specified, IndexAFP uses the medium map name in the first inline form definition or, if no inline form definitions exist, in the first Invoke Medium Map (IMM) structured field. If no inline form definitions or IMM structured fields exist, IndexAFP uses a null name to indicate that the first medium map in the form definition is the active medium map for the first page.
Example:-formDef F1USER10
-i inputfile
The full path name of the input AFP file that you want to process. The input file must contain MO:DCA-P data with no line data.
This option is required.
-log
IndexAFP writes messages to the index.log file in the directory where the IndexAFP.jar file is located. If the file exists, IndexAFP appends messages to it.
This option is not required. If it is not specified, IndexAFP writes messages only to the terminal.
-o outputfile
The full path name of the file where the output AFP file is written. Any existing data in the file is overwritten.
This option is required.
-resDir resourcedirectory;...
The full path names of one or more AFP resource directories that contain AFP resources. IndexAFP looks for AFP resources in these resource directories before the resource directories identified to AFP Visual Environment when the control file was created. This option is not required.
Specify this option if AFP resources are not inline and are not in the same directories that you identified to AFP Visual Environment when the control file was created.
Separate multiple directories with a semicolon. If a resource directory path name contains a blank, enclose the path name in double quotation marks.
-resGrp resourcegroupfile
The full path name of the resource group file that you want IndexAFP to create. Any existing data in the file is overwritten. This option is not required. If it is not specified, IndexAFP does not create a resource group file.
If IndexAFP cannot find a resource, it creates the resource file without the missing resource and writes a message identifying the missing resource to stderr and in the log file.
-stats
IndexAFP writes statistics to the terminal.
This option is not required.
-te triggerexit
The trigger exit class name.
This option is not required.
-threads nn
The number of threads that IndexAFP starts. The default is 5 threads.
This option is not required.
-trace tracefile
The full path name of the file where IndexAFP writes trace information. If the file already exists, IndexAFP appends to it. Otherwise, IndexAFP creates the file. Use this option for diagnostic purposes only.
-trclvl level
The level of tracing. This option is not required.
Values for level are:
debug
Trace at a higher level.
normal
Trace at a lower level (default).
-ue userexit
The user exit class name.
This option is not required.
-version
Displays the version number of IndexAFP.
This option is not required.

Examples–IndexAFP

AIX: This example creates page groups and index tags defined in the infile.ctl control file and writes the output to the outfile.afp file:

java -jar /install_directory/plugins/IndexAFP/IndexAFP.jar-i /directory/infile.afp -o /directory/outfile.afp-c /directory/infile.ctl

Windows: This example creates page groups and index tags defined in the infile.ctl control file and writes the output to the outfile.afp file:

java -jar \install_directory\plugins\IndexAFP\IndexAFP.jar-i \directory\infile.afp -o \directory\outfile.afp-c \directory\infile.ctl

z/OS: This example creates page groups and index tags defined in the infile.ctl control file and writes the output to the outfile.afp file. Enter this command on the z/OS UNIX command line:

java -jar /install_directory/plugins/IndexAFP/IndexAFP.jar-i /directory/infile.afp -o /directory/outfile.afp-c /directory/infile.ctl

For install_directory, use the directory where you installed AFP Visual Environment.

For directory, use the directory where the file is located.

Exit codes

0
IndexAFP was successful.
<0
IndexAFP was not successful. No output file was created, or the output file is incomplete. IndexAFP writes error messages to stderr and in the log file.