!############################################################################
! READ.BAS      This program allows the AMUS user to search all Newsletters
!               in [100,4]. It will allow a max. of 3 keywords for searching.
!               This program creates READ.CMD which is chained after input.
!
! by Dave Heyliger for the AMUS Network         06-24-85
!
!############################################################################

THE'MAPS:
       MAP1    NUMBER'OF'KEYWORDS,F
       MAP1    SEARCH'STRING1,S,20
       MAP1    SEARCH'STRING2,S,20
       MAP1    SEARCH'STRING3,S,20
       MAP1    FILE'TO'SEARCH,S,20
       MAP1    OPTION,S,1
       MAP1    UCS'OPTION,S,1

THE'INTRODUCTION:
       PRINT TAB(-1,0)
       PRINT TAB(-1,29)
       PRINT TAB(5,25) "+----------------------------+"
       PRINT TAB(6,25) "|    AMUS READING UTILITY    |"
       PRINT TAB(7,25) "|      (via VPS Search)      |"
       PRINT TAB(8,25) "| Search Newsletters [100,4] |"
       PRINT TAB(9,25) "+----------------------------+"
       PRINT TAB(12,25)"NOTE: ^C is not set until all "
       PRINT TAB(13,25)"      data is entered for the "
       PRINT TAB(14,25)"      searching process.      "
       PRINT TAB(-1,28)
       INPUT "            ENTER OPTION (d=directions, q=quit, c=continue) -> ",OPTION
       UCS'OPTION = UCS(OPTION)

CHECK'THE'OPTIONS:
       IF UCS'OPTION = "D" THEN GOTO DIRECTIONS
       IF UCS'OPTION = "C" THEN GOTO GRAB'THE'SEARCH'STRINGS
       CHAIN "DSK0:GOTHRE.CMD[2,2]"

DIRECTIONS:
       PRINT TAB(-1,0)
       PRINT TAB(-1,29)
       PRINT TAB(3,16) "   This program searches all NEWSLETTER files."
       PRINT TAB(6,16) "To search, AMUS suggests searching by Keywords, like"
       PRINT TAB(7,16) "VCR, memory, boot, MONTST, etc....."
       PRINT TAB(9,16) "Search Newsletters with up to THREE Keywords MAXIMUM."
       PRINT TAB(13,16)"The program 'walks' you through the input,  and then"
       PRINT TAB(14,16)"allows you the option of jumping back to your system"
       PRINT TAB(15,16)"so you can set up a generic 'get' , or, you may skip"
       PRINT TAB(16,16)"this option and use ^s ^q as the data is displayed."
       PRINT TAB(17,16)"The search will be done when you return to the DOT,"
       PRINT TAB(18,16)"or you ^C out of the search."
       PRINT TAB(19,16)
       PRINT TAB(-1,28)
       INPUT "                  ENTER OPTION (c=continue, q=quit) -> ",OPTION
       UCS'OPTION = UCS(OPTION)
       GOTO CHECK'THE'OPTIONS

GRAB'THE'SEARCH'STRINGS:
       PRINT TAB(-1,0)
       PRINT TAB(5,1)
       INPUT "Enter the number of keywords to search for (3 max) ->",NUMBER'OF'KEYWORDS
       IF NUMBER'OF'KEYWORDS > 0 THEN INPUT "           Input search string up to 20 characters ->",SEARCH'STRING1
       IF NUMBER'OF'KEYWORDS > 1 THEN INPUT "           Input search string up to 20 characters ->",SEARCH'STRING2
       IF NUMBER'OF'KEYWORDS > 2 THEN INPUT "           Input search string up to 20 characters ->",SEARCH'STRING3
       PRINT TAB(-1,0)
       PRINT
       PRINT "       If you want to 'capture' the data as it is typed on the screen"
       PRINT "       you may choose to do so at this time.  Answering a 'y' will put"
       PRINT "       the job to sleep while you exit to your system to set up the 'get'"
       INPUT "             Do you want to 'capture' the data on your system -> ",OPTION
       UCS'OPTION = UCS(OPTION)

THE'SEARCH:
       PRINT TAB(-1,28)
       PRINT TAB(-1,0)

       OPEN #1,"READ.CMD",OUTPUT
       PRINT #1,":R"
       PRINT #1,"XY=0"
       IF UCS'OPTION = "Y" THEN PRINT #1,":< JOB SLEEPING WHILE YOU EXIT TO SET UP YOUR 'GET'..."
       IF UCS'OPTION = "Y" THEN PRINT #1,"  BE SURE TO RETURN TO AMUS FOR THE DATA DISPLAY"
       IF UCS'OPTION = "Y" THEN PRINT #1,">":PRINT #1,"SLEEP 25"
       PRINT #1,"NOGO"
       PRINT #1,"SET CTRLC"
       PRINT #1,"SRCH NEWS*.*"
       PRINT #1,"TTT"
       IF SEARCH'STRING1 <> "" THEN PRINT #1,SEARCH'STRING1
       IF SEARCH'STRING2 <> "" THEN PRINT #1,SEARCH'STRING2
       IF SEARCH'STRING3 <> "" THEN PRINT #1,SEARCH'STRING3
       PRINT #1,CHR(13)
       PRINT #1,CHR(13)
       CLOSE #1
       CHAIN "READ.CMD"