Previous Page | Next Page

SAS Component Language Dictionary

VARINFMT



Returns the informat that is assigned to a SAS table column
Category: Variable

Syntax
Details
Example
See Also

Syntax

informat=VARINFMT(table-id,var-num);

informat

contains the informat that is assigned to the column.

Type: Character

table-id

is the identifier that was assigned when the table was opened. If table-id is invalid, the program halts.

Type: Numeric

var-num

is the number of the column in the SAS table. This number is adjacent to the column in the list that is produced by the CONTENTS procedure. The VARNUM function returns this number.

Type: Numeric


Details

If no informat has been assigned to the column, a blank string is returned.


Example

Obtain the informat of the column NAME in the SAS table MYDATA:

length infmt $ 12;
tableid=open('mydata','i');
if tableid then
   do;
      infmt=varinfmt(tableid,varnum(tableid,'name'));
      rc=close(tableid);
   end;


See Also

VARFMT

VARNUM

Previous Page | Next Page | Top of Page