home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: InfoMgt / InfoMgt.zip / MArb92a.zip / Age2234.cmd next >
OS/2 REXX Batch file  |  1996-04-04  |  944b  |  29 lines

  1. /* REXX: Select on Age */
  2.  
  3.  
  4. /*  Function     : Demonstration agent whose task is to determine
  5.                    whether the current source record contains an
  6.                    age value in the specified range in the two byte
  7.                    area starting in byte 16. Uses the function GetData()
  8.                    to return the entire record image.
  9.     Created      : February 10, 1996
  10.     Modifications:
  11. */
  12.   
  13. /* Places value of list prospect's age into
  14.    agent global variable pool using Store()
  15.    function. Retrieves value using Fetch() function.
  16.    Neither function is necessary. Just used to
  17.    illustrate use of Store() and Fetch() functions.
  18. */
  19.     CALL Store "Age",,
  20.                SUBSTR(GetData("Record"),13,2)
  21.     SELECT
  22.         WHEN Fetch("Age") > "21" &,
  23.              SUBSTR(GetData("Record"),13,2) < "35"
  24.             THEN
  25.                 RETURN 1
  26.         OTHERWISE
  27.             RETURN 0
  28.     END
  29.