Chapter Contents |
Previous |
Next |
FORMAT |
Category: | Formatting |
Syntax | |
Details | |
Examples | |
Example 1: Verifying the Validity of a Character Format | |
Example 2: Verifying the Validity of a Numeric Format | |
See Also |
Syntax |
rc=FORMAT(format,type); |
1 | successful |
0 | not successful |
Type: Numeric
Type: Character
'C' |
character |
'N' |
numeric. |
Type: Character
Details |
If the specified format is not known to the SAS session, then the operation is unsuccessful. The function verifies that valid widths are specified for formats.
See SAS Language Reference: Dictionary for details about formats.
Examples |
Assume that you want to use the $CHAR12. format and to verify that $CHAR12. is a valid character format. (If the format name is valid, then the value returned to the variable RC is 1.)
rc=format('$char12.','c');
Verify that 5.6
is not
a valid format for numeric values. (If it is not valid, then the value returned
to the variable RC is 0.)
rc=format('5.6','n');
See Also |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.