* EMPLOYEE.ADD * Purpose: to enter basic data on employees into EMPLOYEE.DBF * * Set up initial format SET DEFAULT TO B SET INTENSITY OFF SET TALK OFF SET CONSOLE ON SET COLON OFF SET BELL OFF * * Set loop to repeat for more entries * STORE T to more DO WHILE more * * Clear screen and set initial variables to the file. * ERASE STORE ' ' to mlast STORE ' ' to mfirst STORE ' ' to minitial STORE ' ' to mstreet STORE ' ' to mcity STORE ' ' to mstate STORE ' ' to mzip STORE ' ' to mphone STORE ' ' to mssno STORE ' ' to mborn STORE ' ' to msex STORE N to mminority STORE ' ' to mhired STORE Y to mmarried STORE 0 to mdepend STORE Y to mhealth STORE Y to mmmed STORE Y to mdental STORE Y to mlife STORE Y to mpension * Set up loop to give a chance for correction before adding to file. * STORE T TO continue DO WHILE continue SET FORMAT TO EMPLOYEE.FMT READ * Select a point at the bottom to prompt for corrections. @ 19,0 SAY " " @ 19,5 SAY 'Do you wish to make corrections? (Y/N)' WAIT TO continue ENDDO *WHILE continue ERASE * * If entries are correct, add them to the database. USE EMPLOYEE INDEX empname, empno APPEND BLANK REPLACE LAST with mlast, FIRST with mfirst, INITIAL with minitial REPLACE STREET with mstreet, CITY with mcity, STATE with mstate REPLACE ZIP with mzip, PHONE with mphone, BORN with mborn REPLACE SEX with msex, MINORITY with mminority, HIRED with mhired REPLACE MARRIED with mmarried, DEPEND with mdepend, HEALTH with mhealth REPLACE LIFE with mlife, PENSION with mpension * * Prompt for further entries. @ 19,0 SAY ' ' INPUT 'MORE ENTRIES? (Y or N)' to more ERASE ENDDO *WHILE more RETURN re entries * STORE T to more DO WHILE more * * Clear screen and set initial variables to the file. * ERASE STORE ' ' to mlast STORE ' ' to mfirst STORE ' ' to minitial STORE ' ' to mstreet STORE ' ' to mcity STORE ' ' to mst