Create the index on STATE. In this example, the data set model object is being used as a stand-alone object. Therefore, if you are using SCL similar to this with a data form object or data table object, you should omit the LOADCLASS and INSTANCE functions.
INIT:
   dsid=open('sasuser.crime', 'v');
   rc=icreate(dsid, 'state', 'state');
   dsid=close(dsid);

   datcl=loadclass('sashelp.fsp.datast_m.class');
   datid=instance(datcl);