Previous Page | Next Page

SAS Component Language Dictionary

INFORMAT



Verifies that the specified informat is valid
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);

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


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


Example 1: Verifying the Validity of a Character Informat

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');


Example 2: Verifying the Validity of a Numeric Informat

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

FORMAT

Previous Page | Next Page | Top of Page