TurboIMAGE/XL Database Management System Reference Manual MPE/iX V6.5 (30391-90011)

Chapter 6 265
Host Language Access
C
}
else
{
/* Start retrieving all records in the current chain */
printf("\n");
printf("Acct-Number Stock_Number Price Tax Total Purch-Date \n");
printf("---------------------------------------------------------\n");
Mode = 5;
strcpy((char *)List,Item_List);
while (Status.Condition != End_Of_Chain)
{
DBGET(DBname,Sales_D_Set,&Mode,&Status,List,&Sales_Buffer,
&Dummy);
if (Status.Condition == 0)
{
printf("\n");
printf("%11d",Sales_Buffer.Account_Number);
printf("%13.8s",Sales_Buffer.Stock_Number);
printf("%8d",Sales_Buffer.Price);
printf("%6d",Sales_Buffer.Tax);
printf("%7d",Sales_Buffer.Total);
printf("%12.6s",Sales_Buffer.Purch_Date);
}
else
{
if (Status.Condition == End_Of_Chain)
{
printf("\n\n\n");
printf ("----> End Of Chain.\n");
}
else
Get_Error_And_Explain();
}
} /* while */
} /* else */
/* Release all locks acquired at the beginning of the process */
Mode = 1; = 1;
DBUNLOCK (DBname,Sales_D_Set,&Mode,&Status);
if (Status.Condition != 0)
Get_Error_And_Explain();
}