SAS Component Language Dictionary |
Verifies that the specified informat is valid
rc=INFORMAT(informat,type);
|
-
rc
-
contains the return code for the operation:
1 |
successful |
0 |
not successful |
Type:
Numeric
-
informat
-
is an informat that is supplied by SAS or
created using the FORMAT procedure. The name of an informat must include a
period (for example, date7. or comma10.2).
Type:
Character
-
type
-
specifies the type of the informat:
'C' |
character |
'N' |
numeric |
Type: Character
If the specified informat is not known to the SAS session,
then the operation is unsuccessful. The function verifies that valid widths
are specified for informats.
See
SAS Language Reference: Dictionary
for details about informats.
Verify that $MYFMT. is
a valid character informat that has been defined for the current SAS session.
(The value returned to the variable RC is 1.)
rc=informat('$myfmt.','c');
Verify that 5.6 is not
a valid informat for numeric values. (The value returned to the variable RC
is 0.)
rc=informat('5.6','n');
FORMAT
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.