BBjFileSystem::makeKeySegment

Description

In BBj 6.0 and higher, this method creates a BBjKeySegment object. BBjKeySegment objects are used to construct BBjKeyInfo objects, which can be used to manipulate VKEYED file key chains dynamically.

Syntax

Return Value

Method

BBjKeySegment

makeKeySegment(int field, int offset, int length, boolean descending, boolean numeric)

Parameters

Variable

Description

field

Specifies the field number in the record, where fields are separated by the $0A$ character. Specify 0 to define a segment based on the entire record without regard to field separators.

offset

Specifies the zero-based offset within the field. Note this is different from the VKEYED verb, in which the one-based offset is specified.

length

Specifies the segment length.

descending

Indicates that the segment is in descending order.

numeric

Indicates that the key segment should be sorted in numeric order. This flag is only valid if the key segment is exactly 8 bytes long. If this option is used, the segment is assumed to contain a business floating point quantity (string template data type "B").

Return Value

Returns a BBjKeySegment object. One or more BBjKeySegment objects are used to create a BBjKeyInfo object, which is used to manipulate VKEYED key chains.

Remarks

None.

Example

rem ' Obtain the instance of the BBjFileSystem object

BBjFileSystem! = BBjAPI().getFileSystem()

rem ' Create a BBjKeySegment object
BBjKeySegment! = BBjFileSystem!.makeKeySegment(0,0,10,0,0)

rem ' Create a BBjKeyInfo object
BBjKeyInfo! = BBjFileSystem!.makeKeyInfo(BBjKeySegment!,0)

See Also

BBjAPI

BBjSysGui

Object Variables

See the BBj Object Diagram for an illustration of the relationship between BBj Objects