SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3

COLLATE Function

Returns an ASCII or EBCDIC collating sequence character string

Category: Character

See: COLLATE Function in the documentation for your operating environment.

Syntax

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

Arguments

start-position

end-position

length

Details

If the COLLATE function returns a value to a variable that has not yet been assigned a length, by default the variable is assigned a length of 200.

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

Examples

The following SAS statements produce these results.

SAS Statements

Results

ASCII

----+----1----+-----2--

x=collate(48,,10); y=collate(48,57); put @1 x @14 y;

0123456789 0123456789

EBCDIC

 

x=collate(240,,10); y=collate(240,249); put @1 x @14 y;

0123456789 0123456789

See Also

Functions:

Категории