1! RECEIV EDIT 01 JUL-28, 1967 Peter Mullen 20! RECEIV is a program that will get a communication that has been left by another user for this user. 21! RECEIV opens the file (1,2)MESMAN.PT2 and by following the linked list structure that MESMAN has created, it can determine if there is a communication waiting for this user. 22! If there is a communication waiting then the program will get it out of file (1,2)MESMAN.STR using the pointer that is stored in the linked list. 30!!!OPERATING INSTRUCTIONS: The first question asks for a listing device. The communication is listed. If the listing device was a file then MESMAN is sent a message to take this communication of the linked list. 31! If the listing device was not a file then the user is asked if he wishes to save the message. If he answers YES then the program goes back to question one, otherwise MESMAN is sent a message. 99!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 990 PRINT 'RECEIVE V01-1A ';TIME$(0%);' ';DATE$(0%) \ PRINT \ A9$='(1,3)' ! PRINT HEADER 1000 ON ERROR GOTO 19000 \ A1%=CVT$%(RIGHT(SYS(CHR$(6%)+CHR$(14%)),7%)) \ T%=1% ! GET PPN OF USER 1010 OPEN A9$+'MESMAN.PT2' FOR INPUT AS FILE 2% \ OPEN A9$+'MESMAN.STR' FOR INPUT AS FILE 3% \ DIM #2%, L3%(32767%) \ DIM #3%, M$(32767%)=32% 1020 IF L3%(T%+1%)<>A1% THEN IF L3%(T%)=-1% THEN 32750 ELSE T%=L3%(T%)\ GOTO 1020 ! SEARCH LIST FOR PPN OF USER 1030 PRINT 'OUTPUT TO (RETURN KEY, TO LIST ON TERMINAL)'; \ INPUT LINE I1$ \ I1$=CVT$$(I1$,-1%) \ I1$='KB:' UNLESS LEN(I1$) \ OPEN I1$ FOR OUTPUT AS FILE 1% ! GET OUTPUT FILE 1040 P%=T%+2% \ WHILE P%<>-1% \ GOSUB 10000 \ P%=L3%(P%) \ NEXT \ I2$=LEFT(I1$,2%) \ IF I2$<>'KB' AND I2$<>'LP' THEN 1060 ! LIST MESSAGES 1050 PRINT 'DO YOU WANT TO SAVE THIS MESSAGE'; \ I3$='' \ INPUT '(YES OR NO)'; I3$ UNTIL I3$='YES' OR I3$='NO' \ IF I3$='YES' THEN 1030 ! SHOULD MESSAGES BE SAVED? 1060 GOSUB 11000 \ CLOSE 1% \ GOTO 32760 ! SEND MESSAGE TO 'MESMAN' TO DELETE THIS MESSAGE 10000 T1%=L3%(P%+1%) \ T2%=ASCII(M$(T1%))-1% \ PRINT #1%, RIGHT(M$(T1%),2%); \ PRINT #1%, M$(T1%+J%); FOR J%=1% TO T2% \ RETURN ! PRINT MESSAGE 11000 ON ERROR GOTO 11020 \ I1$=MID(SYS(CHR$(6%)+CHR$(-10%)+'MESMAN'),7%,4%) \ I$=SYS(CHR$(6%)+CHR$(18%)+CHR$(-1%)+CHR$(0%)+I1$+CHR$(2%)) ! SEND MESSAGE TO MESMAN 11010 RETURN 11020 IF ERR=5% THEN RESUME 11010 ELSE ON ERROR GOTO 0 19000 IF ERR=5% THEN RESUME 32750 ELSE IF ERR=2% OR ERR=10% THEN PRINT 'BAD FILE NAME- ';I1$ \ RESUME 1030 19010 IF ERR=11% THEN RESUME 1060 IF ERL=1050 \ RESUME 32760 19020 ON ERROR GOTO 0 32750 PRINT 'NO MESSAGES WAITING' 32760 END