|
xvsamCreate |
|
|
xvsamCreate creates the definition for a new base cluster in the catalog. It creates only a definition, so that data set remains empty until it has been filled up by means of the xvsamImport function. During the creation, the primary key and all the secondary key records are written in both files Catalog.dat and Catalog.idx, and the correspondent C-ISAM components - vsamfile.idx and vsamfile.dat are created and initialized too. For this reason you are no longer requested to build up explicitly the alternate indices relative to a base cluster by means of the BLDINDX feature of IDCAMS. xvsamCreate reads the launch parameters from standard input, line after line until the end-of-data indicator is encountered or you interrupt it by means of <CTRL+D>. That allows you to group together the creation of more than one base cluster or alternate index path within a single xvsamCreate command. Its functionality corresponds to those of the IDCAMS statements:
Syntax xvsamCreate Standard input format for clusters is the following: C <catalog> <NAME> <path> (K|R|E) (F|V) <min> <max> <nk> <koff> <klen> <name> <Y|N> while for alternate indexes is: A <catalog> <NAME> <primary> (D|U) <nk> <koff> <klen> Parameters
During the creation of a cluster or an alternate index path, you can inform xvsamCreate to produce a logging file containing the results of operations. To do it, you should provide the -d<name> optional parameter. If this parameter is present, the utility creates a logging file with the name specified in <name>. If only -d is given, the logging file will be created in the same directory where xvsamCreate has been started, with the default name xvsamCreate.log. The level of detail with which XVSAM should report the sequence of operations on the protocol file, may be specified by means of the -l<level> optional parameter. For example, let us create a KSDS file named mycluster, belonging to the TESTCAT catalog and having fixed length records. The record size - minimum and maximum record length - is 38 bytes and the primary record key is 10 bytes long and starts from the beginning of the record. The syntax of the command for creating the file is the following: # xvsamCreate It is also possible to create more than one cluster at the same time as shown in the following script. In this example we intend to create one KSDS cluster - VSAMFILE - reusable, with variable length records and the path entries relative to two alternate indices. We want also the run of the procedure to be logged in a protocol file named mydebug.log. #!/bin/ksh Return codes
|