home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CP/M
/
CPM_CDROM.iso
/
cpm
/
dbaseii
/
tdas.ark
/
STUDENT3.PRG
< prev
next >
Wrap
Text File
|
1986-08-24
|
3KB
|
130 lines
*******************************************************************************
* This program plucks a student from the alumni or inactive file *
* and restores him/her to the active student file. *
*******************************************************************************
SET Talk OFF
STORE T TO delerec
STORE T TO Repeat
STORE F to drec,query2
STORE " " to Mname
ERASE
*
DO WHILE Delerec
DO WHILE Repeat
USE Xstudent
@ 3,27 SAY "YOUR COMPANY'S EX-STUDENTS"
@ 5,2 SAY "**==>Let me guide you through restoring a student to the active;
file:<==**"
@ 13,1 SAY "Enter the student's last name OR the account number";
GET Mname
READ NOUPDATE
IF Mname = " "
STORE F TO Delerec
STORE F TO Repeat
STORE F TO Finish
LOOP
ENDIF
IF VAL (Mname)>500
SET Index TO Xid,Xlname
STORE $(Mname,1,4) to Findstud
ELSE
SET Index TO Xlname,Xid
STORE TRIM(Mname) to Findstud
ENDIF
Find &Findstud
IF #=0
@ 22,0 say Findstud+" is not in the ex-student file"
LOOP
ENDIF
IF #>0
STORE # to Placemark
IF .NOT. Acct:num=Findstud .OR. .NOT. Lname=Findstud
SKIP
IF Lname=Findstud .AND..NOT.EOF
ERASE
@ 1,1 SAY "Goodness me! It would appear we have more than one ";
+Findstud
SKIP -1
?
DISPLAY Fname,Lname WHILE Lname=Findstud
?
INPUT "Enter the number from the left column, or enter (numerical);
0 to abort" to Placemark
ENDIF
ENDIF
If Placemark >0
GO Placemark
SET format TO Student4
READ NOUPDATE
SET format TO Screen
INPUT 'Put this student back in the "Active" file (Y/N)?' to Query
IF Query
COPY NEXT 1 to Tfile DELETE
ERASE
ENDIF
ENDIF
*
USE Student
SET Index TO Lname,ID
APPEND From Tfile
STORE " " to Mname
ERASE
*
INPUT "Are there more students to restore to the active file (Y/N)?";
TO Repeat
IF Repeat
ERASE
LOOP
USE Xstudent
SET Index TO Xlname,Xid
STORE " " TO Placemark
STORE " " TO Findstud
ELSE
STORE T TO Finish
*
IF Finish
ERASE
USE Xstudent Index Xlname,Xid
DISPLAY OFF TRIM (Fname),Lname for *
?
INPUT "Are you sure? Sure you want the activation (Y/N)?" to Query2
IF Query2
ERASE
USE Xstudent
@ 10,11 SAY "Why not go downstairs and turn off the the T.V. & lights?"
@ 12,11 SAY "This will probably take 45 seconds or so; you have time."
@ 15,14 SAY "When you get back, the transfer will be complete."
@ 17,14 SAY "You'll then be positioned back at the Main Menu."
PACK
INDEX on Lname+Fname TO Xlname
INDEX on Acct:num TO XID
ELSE
RECALL ALL
ENDIF
ERASE
ENDIF
STORE F to Delerec
DELETE file Tfile
ENDDO
RELEASE Editrec,Mname,Placemark,Drec,Query,Query2,Finish,Repeat,Findstud
USE
SET Talk ON
RETURN
* EOF
indstud
ELSE
STORE T TO Finish
*
IF Finish
ERASE
USE Xstudent Index Xlname,Xid
DISPLAY OFF TRIM (Fname),Lname for