Use the command line interface to create or edit index
entries for Archive Files. You can enter commands on the command line,
or in a parameter file.
Syntax for Index Maintenance
Use the following
syntax for Index Maintenance. Enter the command and all parameters
on a single line:
PR0CMND /ARCIDXMAINT
OPERATION={PROPAGATE | UPDATE | DELETE }
[OUTPUT=filename[+] ] [PST=optimdirectory]
Parameters
You can enter parameters with the
command on the command line, or you can enter these parameters into
a text file (called a
parameter file).
A parameter
file can be reused whenever you need to run a task. You can also generate
a parameter file programmatically, which allows you to automate processes.
You
can enter parameters for more than one process into a parameter file.
This allows you to run multiple processes by entering a single command
on the command line. Enter the parameters for each process on a separate
line of the parameter file.
Propagate, Update, or Delete Process
AFFILE=[ " ]arcfilename.af[ " ]
[SERVER={arcservername | (local) } ]
[AFXFILE=[ " ]idxfilename.afx[ " ] ]
TABLE=[ " ]tablename[ " ]
IDXCOLS=[ " ]col1[ " ],[ " ]coln[ " ]
IDXNAME=[ " ]idxname[ " ]
Command Line Parameters
- PR0CMND
- Type PR0CMND to initiate command
line processing. Note that the character following PR is
the number 0 (zero).
- /ARCIDXMAINT
- Command to perform Archive Index Maintenance.
- OPERATION=
- Type of index maintenance as one of the following:
- PROPAGATE
- Add an index for all occurrences of the table and
update existing indexes. Propagate is the default for new indexes.
- UPDATE
- Update the existing index. Information in this command
replaces the existing index entry.
- DELETE
- Remove the index for all occurrences of the table.
- OUTPUT=filename
- File for the process report. If you do not use this
keyword, the command echo and error messages display automatically
after the process completes. In a UNIX or Linux environment, the report
is displayed to the console.
- filename
- The name of the file. If you do not provide the
full path, the file is saved in the default Data Directory, identified
in Personal Options.
- +
- Append the report to an existing file.
- PST=
- The Optim Directory for maintenance. If maintenance is for the
current (default) Optim Directory, you may omit this parameter.
- optimdirectory
- Optim™ Directory
name.
- AFFILE=
- The Archive File for which an index is being created
or edited.
- arcfilename.af
- The name of the Archive File. Provide the full path
if the file is not in the default Archive File Directory.
- SERVER=
- Server, if any, on which the Archive File resides.
- arcservername
- The name of an Optim Server
that is referenced in the Product Configuration File.
- (local)
- The local server. (Default)
- AFXFILE=
- The Archive Index File name to be processed.
- idxfilename.afx
- Provide the full path if the file is not in the default Archive
Index File Directory.
- TABLE=tablename
- Name of the table for which the index file is being created.
- IDXCOLS=(col1,col2,...coln)
- Names of the columns to be defined as the index.
- IDXNAME=idxname
- Name of the index column or columns. For multiple indexes, use
semicolons to separate the names. If you omit this parameter, an error
message displays.
- COMPRESSIDX={ YES | NO }
- Use this parameter to compress or uncompress an index file. Specify:
- YES
- Compress the archive file. (Default)
- NO
- Do not compress the archive file.
- RUN
- Use this command to end the index creation process.
To use the command line for a single process:
Note:
All command line parameters must be on one line. Due to space constraints,
the example shown below spans several lines.
PR0CMND /ARCIDXMAINT OPERATION=PROPAGATE OUTPUT=Result.txtPST=PSTDIR
AFFILE=ARCFILENAME.AF SERVER=local AFXFILE=ARCINDEXFILENAME.AFX
TABLE=TABLENAME1IDXCOLS=COL1 IDXNAME=index_001
In
the following example, a parameter file is used to propagate indexes
in index file ARCINDEXFILENAME.AFX for the Archive File ARCFILENAME.AF.
From TABLENAME1, COL1 is used to create index_001. Columns from TABLENAME2
are used to create 3 indexes: COL1 for index_001, COL2 for index_002,
COL1 and COL2 for index_003.
OPERATION=PROPAGATE
OUTPUT=Result.txt
PST=PSTDIR
AFFILE=ARCFILENAME.AF
SERVER=local
AFXFILE=ARCINDEXFILENAME.AFX
TABLE=TABLENAME1
IDXCOLS= COL1
IDXNAME=index_001
RUN
TABLE=TABLENAME2
IDXCOLS= COL1;COL2;COL1,COL2
IDXNAME=index_001;index_002;index_003
RUN