The generalized partitioned file administration utility is used to easily manage partitioned files.
ctpartadmin [-u user] [-p password] [-s server] [-f filename] [-w file password] [-c command] [-n partition number] [-d partition name] [-k partition key] {-a authfile}
Where:
add - Add new partition
create - Create a partition index
purge - Delete existing partition
archive - Archive existing partition
activate - Activate archived partition
base - Set partition number low limit
status - Return partition status
rebuild - Rebuild partition
lowbound - Get active low partition number
highbound - Get active high partition number
The following options apply to the -c create command.
ctpartadmin -c create -r "year(co_ordrdate) - 2000"
ctpartadmin -c create -f custordr -i "part"
The -g and -G options can be combined and specified multiple times to create a multi-segment key
ctpartadmin -c create -f customer-orders -G customer_category -g order_date
The following options are mutually exclusive, and only one is required (not required for lowbound or highbound options). If more than one is entered, the last option entered prevails.
ctpartadmin return code is used for the status command.
lowbound and highbound output a single value for capture. This value is a LONG.
When the -c create command option is successful the 'file partitioned' message is displayed, and the -c status command option displays 'partition active'
>ctpartadmin -c create -f custordr.dat -u admin -p ADMIN -r year(co_ordrdate) -i part -g co_ordrdate
file partitioned
>ctpartadmin -f custordr.dat -u admin -p ADMIN -c status -n 2002
partition active