• Aucun résultat trouvé

VLP_ALTKEYS

Dans le document SOfTWARE HOST (Page 81-84)

The VLP_ALTKEYS macro creates an area describing alternate index keys for indexed files.

It is used on create opens or on closes.

The VLP_ALTKEYS area includes the field VLP_ALTKEYS.SIZI followed by on array, K. K is on array of dimension (0:N-l), with one entry for each alternate index. For create opens SIZI contains the number of indices that are being created at this time, while N

is the number to leave room for in the File Information Table (FIT).

KEYL - VALUE-DEC(1-255) Specifies the length of the key for this index. The default is one.

CE74-80 VLP_ALTKEYS 3-51

KEYX - VALUE-DEC(0-4000) Specifies the byte offset into the record of the beginning of this key. The default is zero, which indicates the first column in the record.

N - VALUE-DEC(0-80) specifies the number of alternate indices to leave room for in the FIT of the fi Ie. This value is used to initialize VLP_ALTKEYS.SIZI. but the SIZI field may be changed at creote open to establish the number of alternate indices to be

created.

UNIQUE - IYESINOI if YES. then the keys in this index must be unique. If a record is written which contains a key with the some value as an existing key. then the write wil I

fail. If UNIQUE - NO. then dupl icate entries wil I be created if several records have the some key value. The order of the duplicate keys is the order of arrival of the records.

The VLP_ID macro creates an area to be used to either specify or return record identifiers. and to either specify or return presence bits.

A record identifier is used to uniquely identify a single record within a set of dupl icate keys along an alternate index. A record identifier is specified to file management as a double-word. The first word is the count of the number of identifiers.

This field is ignored when specified to fi Ie management. It is only used in conjunction with the IDALL option on MSPRECORD. The second word is a unique record identifier that may be obtained from file management through M$READ. M$WRITE. or MSPRECORD.

VLP_ID may be used to specify or obtain presence bits. Presence bits indicate whether or not fields are present. The bits correspond directly with the VLP_RECFIELD

definition. e.g. the first bit indicates whether or not the first field is present.

etc. If presence bits are not specified on an M$WRITE. then al I ones are assumed.

The first two words of VLP_ID are always reserved for specifying or returning IDs. The space fol lowing that is assumed to be for presence bits.

If a field used to sort a key is not present. then the data in that field is assumed to be invalid. A null value is used to sort the field. Nul I values sort before any user specifiable values. Presence bits do not affect the contents of a record. Records are returned on a read exactly as they were specified on the write.

Presence bits may also be used for M$READs and M$PRECORDs. If presence bits and a key are specified on an M$READ or MSPRECORD. then it is possible to locate records

containing nul I values. The presence bits are used only to indicate which fields in the key presented are null. With the exception of the fields corresponding to the key. the presence bits specified do not have to match the presence bits for the record returned.

Presence bits may also be returned by using the PBR option on MSREAD and M$PRECORD.

COUNT - VALUE-DEC(0-n) specifies the number of record identifiers. This value should always be 1 when IDS-YES.

10 - VALUE-DEC(0-n) specifies the record identifier to search for.

N - VALUE-DEC(0-n) specifies the number of presence bits.

PBITS - VALUE-BIT(1) specifies the presence bit(s).

3-52 CE74-08

The VlR_IO macro is used to generate an area to describe the values returned by the IOAll option for MSPRECORO.

COUNT - VAlUE-OEC(0-n). Specifies the number of record identifiers that exist for the specified key.

10

=

ARRAY VAlUE-OEC(0-n). Is the array of record identifiers that are returned by file management. The size of the array is specified by N.

N = VAlUE-OEC(0-n) specifies the amount of space to al locate for returning record identifiers.

This macro generates an area containing a workstation name. The workstation name is meaningful in conjunction with a device fid or special name (RES on MSDCB or M$OPEN, OEV on M$lOEV). The workstation specifies a cluster of unit record devices; the device type selects those devices in the workstation of that type.

A symbol ('0') can be substituted for the workstation name to mean the user's

workstation of origin. The definition of workstation names and assignment of devices to workstations are made by the installation manager.

WSN

=

VAlUE-CHAR(8) Contains the workstation name which is referenced by WSN in various fi!e management services.

The VlP_SN macro creates an area containing the list of serial numbers of the volumes or tape reels that are to be accessed; or the pack set name for pack set access. The seriai numbers and pack set names may consist of up to 6 alphanumeric characters. The pack set names are defined by the installation manager.

The following examples demonstrate the use of this macro.

Example for disk:

Example for tape:

xv lP _SN (FPTN-TAPE_SET, N-2 , SN-" , 100001 ' , ' 100002 ' " ) ;

N - VAlUE-OEC(l-?) Specifies the number of serial numbers which have been defined within this structure. The default for N is one.

SN - 1 to n VAlUES-CHAR(6) Specifies the serial numbers of the volumes contained in the tape volume set. They must be given in the order that the volume set was created or is to be created.

CE74-00 3-53

Dans le document SOfTWARE HOST (Page 81-84)