Chapter Contents

Previous

Next
COLLATE

COLLATE



Generates an ASCII collating sequence character string

Language element: function
Category: character
OpenVMS specifics: ASCII collating sequence


Syntax
Details
See Also

Syntax

COLLATE(start-position<,end-position>) | (start-position<,,length>)

start-position
specifies the ASCII character where the collating sequence is to begin.

end-position
specifies the ASCII character where the collating sequence is to end.

length
specifies the number of characters in the returned string.


Details

The COLLATE function returns a string of ASCII characters, which can range in value from 0 to 255. The string returned by the COLLATE function begins with the ASCII character specified by start-position. (Characters 128 to 255 are usually special control characters such as special fonts, but the COLLATE function returns them.) If end-position is specified, the string returned by the COLLATE function contains all the ASCII characters between start-position and end-position. If length is specified instead of end-position, then the COLLATE function returns a string of length. The returned string ends, or truncates, with the character having the value 255 if you request a string length that contains characters exceeding this value.

If you specify both end-position and length, the COLLATE function ignores length. If you request a string longer than the remainder of the sequence, COLLATE returns a string through the end of the sequence.

Unless you assign the return value of the COLLATE function to a variable with a defined length of less than 200, the ASCII collating sequence string is padded with blanks to a length of 200. If you request more than 200 characters, the returned string is truncated to a length of 200.

See Also


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.