SUBROUTINE TestRead ************************************************************************** * TestRead.bas - (C) 2014 James Nonnemaker / james(at)nonnemaker.us * * This is a sample UniBasic (PICK Basic) program to access an Inormix DB. * * This program asks the user to input a record ID and reads the details * from a database. It ill let them know if the order has shipped or not. * * Although this program does function, it is intended for demonstration * purposes only, if you require a true program in UniBasic, feel free * to contact me. ************************************************************************** OPEN "DUMMY" TO DB.DUMMY ELSE END PRINT "ENTER RECORD ID: " INPUT RECORD.ID IF RECORD.ID # "" THEN READU DUMMY.DATA FROM DB.DUMMY,RECORD.ID ELSE PRINT "ERROR. RECORD NOT FOUND" IF DUMMY.DATA<7> = "SHIPPED" THEN PRINT "ORDER HAS ALREADY SHIPPED." END ELSE PRINT "ORDER HAS NOT YET SHIPPED, CHANGES CAN BE MADE." END END ELSE PRINT "NO RECORD ID ENTERED." END IF