| SAS Component Language Dictionary |
| Category: | Formatting |
| Syntax | |
| Details | |
| Examples | |
| Example 1: Verifying the Validity of a Character Informat | |
| Example 2: Verifying the Validity of a Numeric Informat | |
| See Also | |
Syntax |
| rc=INFORMAT(informat,type); |
contains the return code for the operation:
| 1 | |
| 0 |
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).
specifies the type of the informat:
| 'C' | |
| 'N' |
| Details |
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.
| Examples |
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');
| See Also |
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.