home *** CD-ROM | disk | FTP | other *** search
- /*
- ** THIS IS A DEMO SCRIPT FOR INTUIDEX 2.2 AND ITS REXX PORT
- **
- ** IT JUST DOES SOME SILLY THINGS WITH A LARGE DATABASE THAT I'VE INCLUDED
- ** WITH THIS VERSION OF INTUIDEX.
- **
- ** I THINK I'M GOING TO HAVE TO GET PERMISSION TO REALLY DISTRIBUTE THAT
- ** USER GROUP LIST, AS IT CAME FROM A/C'S GUIDE, AS WELL AS THE NOW-DEFUNCT
- ** AMIGAWHIRLED
- */
-
- options results
-
- say "Opening user group database!"
- address IDEX1 'OPEN INTUIDEX:DATA/usergroups.dex'
-
- do while((state~="QUIT") & (state~="quit"))
- say
- say "Enter a state to find clubs in:"
- parse pull state
-
- /*
- ** SEE IF THE USER WANTED TO QUIT. WE CHECK BOTH ALL CAPS AND
- ** ALL LOWER CASE
- */
- if(state~="QUIT") then do
- if(state~="quit") then do
-
- /*
- ** NOW WE LOOK FOR THE STATE IN THE USER GROUP DATABASE,
- ** AND GET BACK AS A RESULT THE NUMBER OF MATCHES
- */
- address IDEX1 "FIND 8" STATE
-
- /*
- ** CONVERT THE STRING IN result INTO A NUMBER IN num
- */
- a=length(result)
- num=0
-
- do while(a>1)
- num= 10*num+c2d(left(right(result,a),1))-48
- a= a-1
- end
-
-
- /*
- ** NOW PRINT THE FOUND MATCHES
- */
- say "Found" num "matches:"
- say
-
- if(num > 0) then do
- a=0
- do while(a < num)
- address IDEX1 'GET 2'
- fn= result
-
- address IDEX1 'GET 3'
- ln= result
-
- address IDEX1 'GET 4'
- name= result
-
- say "Contact:" fn ln " Club:" name
-
- address IDEX1 'NEXT'
- a=a+1
- end
- end
- end
- end
- end
-
- say "Exiting FindClub.rexx!"