home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / RXBTNODE.ZIP / RXBTNODE.CMD
OS/2 REXX Batch file  |  1991-04-21  |  1KB  |  43 lines

  1. /*
  2.    Retrieves the last zone:net/node that BinkleyTerm had a mail session
  3.    with, will accept a command line arg which is path\filename pointing
  4.    to your binkley.scd file. If no arg is provided, it assumes that a
  5.    the binkley.scd file is in the current directory.
  6.  
  7.    See comments below concerning setting environment variables.
  8.  
  9.    This code is released into the public domain by Chuck Renshaw on or
  10.    about 4/91 with no guarantees of any type attached. Use it as you
  11.    will, share it if you can.
  12.  
  13. */
  14.  
  15. arg fn
  16. if fn = '' then fn = 'binkley.scd'
  17. rtn = STREAM(fn, 'C', 'OPEN')
  18. lzonel = CHARIN(fn, 33, 1)
  19. lzoneh = CHARIN(fn, 34, 1)
  20. lzone = (lzoneh)(lzonel)
  21. lzoned = C2D(lzone)
  22. lnetl = CHARIN(fn, 35, 1)
  23. lneth = CHARIN(fn, 36, 1)
  24. lnet = (lneth)(lnetl)
  25. lnetd = C2D(lnet)
  26. lnodel = CHARIN(fn, 37, 1)
  27. lnodeh = CHARIN(fn, 38, 1)
  28. lnode = (lnodeh)(lnodel)
  29. lnoded = C2D(lnode)
  30. SAY 'Last mail session''s zone:net/node was' lzoned':'lnetd'/'lnoded'.'
  31. /*
  32.     If you don't want to set environment variables, delete the 3 set
  33.     statements. You also might want to change the names of the env.
  34.     variables to suit your setup. As set up, the zone will be set in
  35.     LZONE, the net in LNET, and the node in LNODE.
  36.  
  37. */
  38. '@set LZONE='lzoned
  39. '@set LNET='lnetd
  40. '@set LNODE='lnoded
  41. /* */
  42. rtn = STREAM(fn, 'C', 'CLOSE')
  43.