SAS Component Language Dictionary |
Verifies that the specified format is valid
-
rc
-
contains the return code for the operation:
1 |
successful |
0 |
not successful |
Type:
Numeric
-
format
-
contains a format that is either supplied
by SAS or created using the FORMAT procedure. The format name must contain
a period (for example, dollar6. or dollar8.2).
Type: Character
-
type
-
specifies the type of the format:
'C' |
character |
'N' |
numeric. |
Type: Character
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.
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');
INFORMAT
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.