6 53 2 C Example

LANSA Open Guide

6.53.2 C Example

BOOL fOK;

int  iSession;

int  iRecordCount;

int  i;

long lFlags;

 

fOK = LceSetSelectOptions(iSession, "*BACKWARDS,  *MAXREC25");

 

fOK = LceSelect(iSession, "SURNAME, SALARY", "PSLMST", "", 

         FALSE, &iRecordCount);

for (i=1; i <= iRecordCount; i++)

{

         fOK = LceGetSelect(iSession, "PSLMST", i, "SURNAME, SALARY");

         fOK = LceGetFieldValueX(iSession, "SURNAME", (char far *) strSurname, lFlags);

}