Help for ROWOP2
PURPOSE
The new version can handle millions of records. It uses dynamic
allocation. Otherwise, it is similar to the old program.
ROWOP performs row operations on an IBIS interface (tabular) file.
There are three modes of operation: delete, select, and pick. The modes
all involve checking the values in a row against an input range
of allowed values. The delete option deletes the rows that satisfy any
range criterion, the select option selects the rows that satify all range
criteria, and the pick option selects the rows that satisfy any range
criterion. The changes are made to the output file, not the input file.
The number of columns is unchanged.
EXECUTION
ROWOP INP=INPUT.INT OUT=OUTPUT.INT KEYCOL=(C1,C2,..Cn) RANGE=(L1,U1, L2,U2, ..., Ln,Un) 'mode
INP is the input IBIS interface file, and OUT is the output IBIS
interface file. KEYCOL are the columns for matching data values. RANGE
specifies that the values in column Ci of INP are checked against the
numeric range designated by Li and Ui. The precision parameter, PREC,
specifies by how much the range limits will be enlarged to overcome
precision problems; the lower limit is lowered by P, and the upper
limit is increased by P. The default for P is zero. The 'mode parameter
chooses the mode of operation -- how the ranges will be used to select
the rows.
EXAMPLES
ROWOP INP=A OUT=B KEYCOL=(1,1,5) RANGE=(0,10, 100,1000, 20.35,20.35) PREC=0.01
The delete mode has been invoked. For each row if the value in
column one is between -0.01 and 10.01 or between 99.99 and 1000.01, or
if the value in column five is between 20.34 and 20.36, then the row
containing those values will be deleted.
ROWOP INP=A OUT=B KEYCOL=(2,6) RANGE=( 1.5,3.0, 250,400) 'SELECT
The select mode has been invoked. For each row if the value in
column two is between 1.5 and 3.0 inclusive AND the value in column six
is between 250 and 400 inclusive then the row will be selected.
ROWOP INP=A OUT=B KEYCOL=(1,2) RANGE=( 1,1, 10,20) 'PICK
The pick mode has been invoked. For each row if the value in
column one is 1 OR the value in column two is between 10 and 20
inclusive then the row will be selected.
ROWOP INP=INPUT.INT OUT=OUTPUT.INT KEYCOL=(C1,C2,..Cn) RANGE=(L1,U1, L2,U2, ..., Ln,Un) NCOPY=(N,ICOL)
The first number, N, in the NCOPY parameter specifies the number of
times the accepted rows will be copied, and the second number specifies
which column to put the index number in. The index number tells which copy
the row belongs to (1 for the first copy, 2 for the second, etc.) If no
index column is specified then the index numbers will not be put in the file.
The copies are made by copying the whole block of output rows, not by copying
each row separately. If the NCOPY parameter is omitted altogether then just
one copy will be made.
ROWOP IN=A OUT=B KEYCOL=(2,3) RANGE=(-90,90, 0,360) 'SELECT NCOPY=(5,4)
The select mode has been invoked. If the values in column two of IN are
between -90 and 90 and those of column three between 0 and 360, then
the rows containing those values are selected (i.e. only those rows
satisfying all the criterion are copied to the output file). Five
copies of the selected rows will be made, with the index number going
into column 4.
RESTRICTIONS
The number of L,U pairs after RANGE must equal the number of columns
listed after KEYCOL. The maximum number of rows from the input interface
file is limited to 1,000,000. The maximum number of ranges that can be
checked is 100.
WRITTEN BY H. Wilczynski 26 Jan 1977
COGNIZANT PROGRAMMER A. L. Zobrist
Revisions:
2008-01-03 WLB Switched to USES_ANSI_C AND LIB_CARTO; misc cleanup.
2015-12-16 WLB Migrated to MIPL.
PARAMETERS:
INP
Input interface file
OUT
Output interface file
KEYCOL
The list of match columns
RANGE
Lower and upper check limits
MODE
Keyword for which mode.
DELETE, SELECT, or PICK
PREC
The precision of the range
limits.
NCOPY
1. The number of copies
to make in the output.
2. The index column.
GR1DIM
Dimension (Graphics-1 only)
See Examples:
Cognizant Programmer: