home *** CD-ROM | disk | FTP | other *** search
- /* ARexx example for RexxFisher:
- *
- * Run this program while KFServer AND RexxFisher are running.
- * I'M MAKING NO EFFORT TO ASSURE THAT THESE TWO ARE AVAILABLE.
- *
- * Written by: Udo Schuermann
- * $VER: RexxDemo 1.2 (1.3.95)
- */
- options results
- address rexxfisher1
-
- RF_VERSION
- say "Hi, you are now connected to ..." result
-
- RF_HELP
- say ""
- say "Here is some HELP for you, information on RexxFisher in other words:"
- say ""
- say result
-
- say "---------------------------------------------------------------------------"
-
- /* Let's give ourselves a nice name */
- RF_HELLO "RexxDemo.kfrx (RexxFisher Demo Script)"
-
- say "Here is Fish #3693 in raw form:"
- RF_GETFISH 3693 /* notice: no 2nd parameter, it's totally unformatted and raw! */
- say result
-
- say "---------------------------------------------------------------------------"
-
- say "Here is the same fish again, but this time nicely formatted to fit 75 columns:"
- RF_GETFISH 0 75 /* fish 0 means CURRENT fish, the most recently accessed record */
- say result
-
- say "---------------------------------------------------------------------------"
-
- say "And now, how about 60 columns?"
- RF_GETFISH 0 60
- say result
-
- say "------------------------------------------------------------"
-
- say "And 40 columns ..."
- RF_GETFISH 0 40
- say result
-
- say "----------------------------------------"
-
- say "You're tremendously impressed, aren't you? :)"
- say ""
-
- say "Here is some status information directly from the KFServer to you:"
- say ""
- RF_STATUS
- say result
-
- say "---------------------------------------------------------------------------"
-
- say "Here is a demonstration of a custom display format (read KingFisher.DOC for"
- say "information because both KingFisher and RexxFisher use the exact same codes"
- say "for the display formats!)"
-
- /* Notice that ARexx doesn't change the \n symbols in any way, they're just
- * passed to the conversion routines so that a '\' symbol followed by a 'n'
- * character causes a line break. See the "Output Formatting" section in
- * the KingFisher2.guide for lots of information on these!
- */
- RF_GETFISH 0 75 "NAME=@{name}\nAUTHOR=@{author}\nDESCRIPTION=@{description}"
- say result
-
- say "---------------------------------------------------------------------------"
-
- /* Here is an example of how to retrieve ONLY a specific field */
- RF_GETFISH 0 999 "@{name}"
- if result = "KingFisher" then
- say "Hey, look! It just so happens that this record is the KingFisher program!"
- else
- say "The program we examine above is not the KingFisher program, but rather "||result
-
- say "---------------------------------------------------------------------------"
-
- say "Now read the RexxFisher section in KingFisher2.guide for some better"
- say "descriptions of what RexxFisher is capable of!"
- say ""
- say "And now we logout of the server again ..."
- RF_BYE
-
- say "Done. Bye-bye!"
-