home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rxxpl201.zip / REXXPL.DOC < prev    next >
Text File  |  1998-01-20  |  20KB  |  561 lines

  1. «SS0,SZ=12PT,UF=STANDARD,LM=0DI,RM=0DI,PW=80DI,OF=0DI,0DI,IP=0DI,0DI,0DI,NJ,HY=0,PL=273LI,273LI,273LI,FD=273LI,TP=0LI,BT=0LI»«US0»
  2.     ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá
  3.     ⁿá ⁿá                                                              ⁿá ⁿá
  4.     ⁿá ⁿá         REXXPL.DOC  -- Carl L. Distefano  1/20/98            ⁿá ⁿá
  5.     ⁿá ⁿá      Documentation for REXXPL.U2 v2.011 [RXXPL201.ZIP]       ⁿá ⁿá
  6.     ⁿá ⁿá                                                              ⁿá ⁿá
  7.     ⁿá ⁿá                      << REXX + XPL >>                        ⁿá ⁿá
  8.     ⁿá ⁿá                                                              ⁿá ⁿá
  9.     ⁿá ⁿá   For XyWrite 4 & XyWrite for Windows Running Under OS/2     ⁿá ⁿá
  10.     ⁿá ⁿá                                                              ⁿá ⁿá
  11.     ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá
  12.  
  13.  
  14. Introduction
  15. ============
  16. Two years ago, after Robert Holmgren showed us that REXX procedures
  17. could be launched from the XyWrite command line with his amazing
  18. XyWrite-OS/2 Shell, I began to ponder what seemed the next logical
  19. question.  If Shell could send REXX instructions to the operating
  20. system (as exemplified by Shell's O2 /R[exx] and RUNCMD facilities),
  21. could it also export the *results* back to Xy?  More provocatively,
  22. short of a REXX-enabled XyWrite for OS/2, can REXX syntax and
  23. capabilities be integrated even more tightly into XyWrite?
  24.  
  25. The Xy-OS/2 Shell held out the tantalizing possibility of such a union,
  26. and dubbed it "RexXPL".  The present package develops the concept
  27. behind the catch phrase.  
  28.  
  29. The core routine, R2X, implements a seamless XPL interface with OS/2
  30. REXX.  With R2X, you can embed full-fledged REXX code in your XPL
  31. programs for runtime execution via Shell.  Programming Save/Gets (S/Gs)
  32. have corresponding REXX variables under a standard naming scheme. 
  33. Variable names and contents are exchanged transparently between the two
  34. environments.  Best of all, the XPL toolbox expands to receive the full
  35. panoply of REXX keyword instructions, built-in functions and external
  36. function libraries, including the powerful RexxUtil library.
  37.  
  38. A companion routine, R2 -- really an application of R2X, but a basic
  39. one -- takes a REXX expression, shells out to OS/2 for evaluation, and
  40. returns the result to XyWrite.  You can use R2 on the command line
  41. (CMline) as a substitute for RexxTry, or call it in your XPL code.
  42.  
  43. The package is rounded out with a pair of more elaborate apps: a file
  44. finder that works across drives and recognizes long filenames, and an
  45. alarm applet.
  46.  
  47.  
  48. Not for Programmers Only!
  49. =========================
  50. You don't need to be a programmer to benefit from RexXPL.  Simply
  51. install the package and try the two bundled utilities.  To get a feel
  52. for how RexXPL works, check out the demo routines in this documentation
  53. (see "Running the Demos", below).
  54.  
  55. And, of course, REXX developers know that on-line help is close at
  56. hand.  Just command "O2 /F /L:REXX <WP_REXREF>" and hit your <Helpkey>
  57. -- or better still, establish an O2 alias.  To try out REXX commands
  58. interactively from the OS/2 command line, "GO2" an OS/2 command prompt
  59. and issue REXXTRY.
  60.  
  61.  
  62. Required Files
  63. ==============
  64. You must install (1) REORGaNiZe v2.0 (archive REORGNZ2.ZIP) and (2) the
  65. XyWrite-OS/2 Shell (archive XYOS2SHL.ZIP) before installing RexXPL. 
  66. Both files are available on the Internet at  AEXyWWWeb AF:  
  67. <http://www.serve.com/xywwweb/>
  68.  
  69.  
  70. Set-Up
  71. ======
  72. 1.  UnZIP the RexXPL ZIP archive file to a temporary directory.  It
  73.     contains three files:
  74.  
  75.     REXXPL.U2 ..... RexXPL base routines and on-line help
  76.     REXXPL.CMD .... REXX-XPL interpreter
  77.     REXXPL.DOC .... Documentation and demo routines (this file)
  78.  
  79. 2.  CAll REXXPL.U2 and set the User Variable (BootDrive letter)
  80.     in frame R2X.  STore REXXPL.U2.
  81.  
  82. 3.  QUIT XyWrite.
  83.  
  84. 4.  From a DOS or OS/2 command prompt, switch to your temporary
  85.     directory and issue the following command (substitute your
  86.     OS/2 boot drive for "d:"):
  87.  
  88.         COPY REXXPL.CMD d:\OS2\MDOS
  89.  
  90. 5.  Issue the following command from a DOS or OS/2 command prompt
  91.     (change "MY.U2" and add path statements as necessary):
  92.  
  93.         COPY/A REXXPL.U2+MY.U2 MY.U2
  94.  
  95. 6.  Reload XyWrite.
  96.  
  97.  
  98. Save/Get Usage
  99. ==============
  100. Programming Save/Gets 710-733 are reserved for use by RexXPL.  If any
  101. of these S/Gs are already in use in your XyWrite setup system, you must
  102. RENUMBER frames R2X and R2 together with REXXPL.CMD.  RENUMBER.PM is a
  103. part of REORGaNiZe, by R.J.Holmgren & C.L.Distefano, available at
  104.  AEXyWWWeb AF <http://www.serve.com/xywwweb/>.
  105.  
  106.  
  107. Running the Demos
  108. =================
  109. Once REXXPL.U2 is installed, you can run the XPL demo programs below by
  110. DeFining the code, putting RUNCODE on the CMline and hitting your
  111. <Helpkey>.  (RUNCODE is included in REXXPL.U2.)  Even more convenient,
  112. set up a dedicated RUNCODE key by adding the following assignment to a
  113. key (e.g., Alt-R) in your keyboard file:
  114.  
  115. nn=NO,JM,(,2,.,P,r,s,K,b,d,A,r,g,),R,u,n,c,o,d,e,NO
  116.  
  117. After SToring and reloading the keyboard file, simply DeFine the demo
  118. code -- be sure to highlight the entire block of code! -- and hit your
  119. RUNCODE key.
  120.  
  121. CMline demos appear in the form "command [arg]<Helpkey>."  Run the demo
  122. by typing the indicated command and argument on the CMline and hitting
  123. <Helpkey>.
  124.  
  125.  
  126. Running the Utilities
  127. =====================
  128. To get a feel for the real-world possibilities of RexXPL, try the ALARM
  129. and FIND2 utilites included in REXXPL.U2.
  130.  
  131. ALARM lets you set audible reminders from the XyWrite command line. 
  132. After installing RexXPL, clear the command line, type HELP ALARM, and
  133. hit <Helpkey> for instructions on use.
  134.  
  135. FIND2 is a souped-up version of Xy's native file FIND command.  It
  136. spans drives, searches in the background (you can work while you wait
  137. for results), and recognizes long filenames.  HELP FIND2<Helpkey>
  138. provides on-line help.
  139.  
  140.  
  141.                            * * * * * *
  142.  
  143.                     INFORMATION FOR DEVELOPERS
  144.  
  145. RexXPL Syntax and Demo Routines
  146. ===============================
  147. R2X imposes three rules on ordinary REXX usage:
  148.  
  149. 1.  Variable names corresponding to S/Gs take the form "xy.n", where
  150. n is the S/G number: xy.00, xy.01, xy.100, xy.a, xy.9, etc.
  151.  
  152. 2.  RexXPL variable names not appearing literally in the REXX code
  153. (e.g., names manufactured by iteration through a DO loop) must be
  154. included in a REXX comment; the comment may include a numeric range
  155. of S/G numbers in the form /* xy.n#n */.  For example, "/* xy.71#75;
  156. xy.100 */" would instruct R2X to process S/Gs 71-75 and 100, in
  157. *addition* to any other S/G numbers appearing explicitly as per
  158. Rule 1.
  159.  
  160. 3.  EXIT instructions must be replaced with SIGNAL EXIT.
  161.  
  162. These rules are illustrated in the demo routines that follow.
  163.  
  164. In demo [1], we use REXX to manipulate and reassign the contents of four XyWrite programming S/Gs (01-04).  Here's a plain-English account of what happens:
  165.  
  166. First, we save four strings, in alphabetical order, to S/Gs 01-04:
  167. " AESV01,APPLES AF AESV02,BANANAS AF AESV03,CHERRIES AF AESV04,DATES AF".  Next, we
  168. shell to REXX and PUSH the contents of the 4 Save/Gets onto the REXX
  169. "queue", or data stack.  Each successive entry sits atop the preceding
  170. one, so that after the fourth PUSH operation, the queue can be
  171. visualized thus:
  172.  
  173. DATES
  174. CHERRIES
  175. BANANAS
  176. APPLES
  177.  
  178. Next, we PULL out the entries one by one, and reassign them to REXX
  179. variables xy.01 through xy.04.  Because PULL is a LIFO command (last
  180. in, first out), the topmost entry comes out first.  Thus, the data are
  181. reassigned in *reverse* alphabetical order (xy.01='DATES',
  182. xy.02='CHERRIES', etc.).  Finally, R2X ports the new S/G assignments
  183. back to XyWrite, and the "before" and "after" values are displayed.
  184.  
  185. ;*; [1]
  186.  ü«SV01,APPLES»«SV02,BANANAS»«SV03,CHERRIES»«SV04,DATES»;*;
  187. «SX05,"Before: S/G 01="+«IS01»+" 02="+«IS02»+" 03="+«IS03»+" 04="+«IS04»»;*;
  188. ;*;
  189. «SV50,
  190.  
  191. /* PUSH S/Gs 01 - 04 onto the REXX queue */
  192. push xy.01
  193. push xy.02
  194. push xy.03
  195. push xy.04
  196.  
  197. /* PULL them out (LIFO); contents are reversed (S/G01 = S/G04, etc.) */
  198. pull xy.01
  199. pull xy.02
  200. pull xy.03
  201. pull xy.04
  202.  
  203. » éú2.r2x é;*;
  204. «SX06,"After:  S/G 01="+«IS01»+" 02="+«IS02»+" 03="+«IS03»+" 04="+«IS04»» ü «PV05»«SX05,@siz(«VA$P.»)+1»«CUa,05»«SX06," "+«IS06»»«LBa» ü? ü;«PR@06»«SX01,«RK»» ü Ç}«SX01,«VA$MG»»«PR@01»«EX»
  205. --------------------------
  206.  
  207. Rule 2 of R2X usage is illustrated in demo [2].  In this example, we
  208. restate the same queuing routine more elegantly, using DO loops to do
  209. the PUSHing and PULLing and a counter variable to generate Save/Get
  210. numbers.  Since those numbers are manufactured (as variable "i"
  211. increments with each pass through the loop), S/G names don't appear
  212. literally as "xy.01" or "xy.02".  Therefore, in accordance with R2X's
  213. second rule, we add a REXX comment to inform R2X of the S/G range: "/*
  214. xy.01#04 */".  The separator "#" is mandatory to indicate the range; a
  215. hyphen will not suffice.
  216.  
  217. RUNCODE demo [2] to see that it works identically to the preceding demo:
  218.  
  219. ;*; [2]
  220.  ü«SV01,APPLES»«SV02,BANANAS»«SV03,CHERRIES»«SV04,DATES»;*;
  221. «SX05,"Before: S/G 01="+«IS01»+" 02="+«IS02»+" 03="+«IS03»+" 04="+«IS04»»;*;
  222. ;*;
  223. «SV50,
  224.  
  225. /* S/G range: xy.01#04 */
  226.  
  227. DO i=1 to 4
  228. if length(i)<2 then i='0'||i /* changes, e.g. "1" to "01" */
  229.  push xy.i
  230.  END
  231.  
  232. DO i=1 to 4
  233. if length(i)<2 then i='0'||i
  234.  pull xy.i
  235.  END
  236.  
  237. » éú2.r2x é;*;
  238. «SX06,"After:  S/G 01="+«IS01»+" 02="+«IS02»+" 03="+«IS03»+" 04="+«IS04»» ü «PV05»«SX05,@siz(«VA$P.»)+1»«CUa,05»«SX06," "+«IS06»»«LBa» ü? ü;«PR@06»«SX01,«RK»» ü Ç}«SX01,«VA$MG»»«PR@01»«EX»
  239. --------------------------
  240.  
  241. Observe the correspondence between XPL S/Gs and their REXX analogs
  242. ( AESV01,... AF vs. "xy.01", etc.):  If the contents of any S/G change in
  243. REXX, the changes are carried forward when XPL execution resumes,
  244. unless the XPL program instructs otherwise (see switch /PROTECT,
  245. below).  Values can be initialized in REXX and imported into Xy, or
  246. vice versa.  In either case, the transition is seamless and smooth.
  247.  
  248. Demo [3] highlights this capability.  S/G 01 starts out with content
  249. and S/G 02 is empty.  In the REXX code, we null out S/G 01 (xy.01='')
  250. and assign new content to S/G 02.  We verify that the change has taken
  251. effect by displaying the new contents on the XyWrite status line. 
  252. Here, no /* xy.nn#nn */ comment is necessary, because both the relevant
  253. RexXPL variables (xy.01 and xy.02) are declared explicitly in the REXX
  254. portion of the code:
  255.  
  256. ;*; [3]
  257. «SV01,This is S/G 01»«SV02,»;*;
  258. ;*;
  259.  ü Before: 01=«PV01» | 02=«PV02»;*;
  260. ;*;
  261. «SV50,
  262.  
  263. xy.01=''
  264. xy.02='This is S/G 02'
  265.  
  266. » éú(2.r2x)«SX01,"After: 01 = "+«IS01»+" | 02 = "+«IS02»»«PR@01»«EX»
  267. --------------------------
  268.  
  269. The third rule of R2X usage requires that all EXIT instructions be
  270. replaced by SIGNAL EXIT.  This is critical, because a simple EXIT would
  271. cause the REXX session to close before sending its output to Xy.
  272.  
  273. Demo [4] is illustrative.  We test for the existence of C:\MYFILE.TXT.
  274. If the file does not exist, we append " does not exist" to the filename
  275. (in var xy.01), SIGNAL EXIT to return to XyWrite, and put the expanded
  276. contents of S/G 01 on the status line with  AEPR@01 AF.
  277.  
  278. ;*; [4]
  279.  ü«SV01,C:\NOWHERE.TST»«SV50,
  280.  
  281. if stream(xy.01,'C','query exists')='' then do
  282.   xy.01=xy.01||' does not exist'
  283.   signal Exit
  284. end
  285.  
  286. else xy.01=xy.01||' exists'
  287.  
  288. » éú(2.r2x)«PR@01»«EX»
  289. --------------------------
  290.  
  291. Had we used an ordinary EXIT command, the routine would have stalled as Xy polled endlessly for REXX output.
  292.  
  293.  
  294. Advanced Features
  295. =================
  296. Error-handling: R2X traps errors that can cripple your routines,
  297. including faulty REXX syntax, unrecognized OS/2 commands, and error
  298. messsages generated by OS/2 executables.
  299.  
  300. For example, what's wrong with the following code?  RUNCODE it to find
  301. out:
  302.  
  303. ;*; [5]
  304. «SV50,
  305.  
  306. if date('w')='Saturday' xy.01='Relax'
  307. else xy.01='Get to work!'
  308.  
  309. » éú(2.r2x)«PR@01»«EX»
  310. --------------------------
  311.  
  312. Built-in Variables: R2X automatically sets the following REXX
  313. variables:
  314.  
  315. Lg   = left guillemet [ AE]
  316. Rg   = right guillemet [ AF]
  317. CrLf = carriage return+line feed [13+10]
  318.  
  319. As shown in demo [6], these variables may be used without first being
  320. declared (see also demo [12]):
  321.  
  322. ;*; [6]
  323. «SV50,
  324.  
  325. xy.01=Lg||Rg||CrLf
  326.  
  327. » éú(2.r2x) ü«PRHere are R2X's built-in variables Lg+Rg+CrLf: @01»«EX»
  328. --------------------------
  329.  
  330. O2|STARTOS2 Switches: R2X accepts all relevant O2 switches (/F or /B,
  331. /FS or /WIN, /MAX or /MIN), including Shell-specific switches like /H,
  332. /P:mask and /L:launch_title.  Command HELP O2<Helpkey> to review the
  333. functions of the various switches.  R2X disables switch /R ("execute
  334. concatenated commands as REXX").
  335.  
  336. Switches must be added on the first line of the R2X argument (S/G 50),
  337. which must end with a carriage return (<CrLf>).
  338.  
  339. For example, in demo [7], we force the REXX procedure to execute in the
  340. foreground by prepending O2|STARTOS2 switch /F to argument:
  341.  
  342. ;*; [7]
  343. «SX01,"XyWrite error message 11 is: "+""""+«VA\11»+""""»;*;
  344. ;*;
  345. «SV50, /f
  346.  
  347. say
  348. say xy.01
  349. say
  350. say 'Press a key'
  351. call SysGetKey('noecho')
  352.  
  353. xy.01='REXX error message 11 is: "'||Errortext(11)||'"'
  354.  
  355. » éú2.r2x é«PR@01»«EX»
  356. --------------------------
  357.  
  358. The /PROTECT Switch
  359. ===================
  360. When the REXX procedure is finished, R2X normally causes XyWrite to
  361. update the contents of all S/Gs to reflect changes made in REXX. 
  362. Switch /PROTECT disables this behavior, ensuring that all XyWrite S/G
  363. values remain unchanged regardless of any contrary action by REXX.  The
  364. switch works by forcing R2 to EXit immediately after launching its .CMD
  365. session, rather than wait for REXX output.  The /PROTECT switch is
  366. "binary" in the sense that its operation is all-or-none: when it's on,
  367. *no* S/G is changed; when it's off (not used), *all* S/Gs used by REXX
  368. are updated in Xy.
  369.  
  370. A beneficial side effect of /PROTECT is that control of the XyWrite
  371. session returns to the user immediately after R2X is called (usually
  372. instanteously).  Also, system overhead is reduced because R2X's
  373. continuous polling is eliminated.
  374.  
  375. The /PROTECT switch *must* be invoked whenever it's essential to shield
  376. S/Gs from manipulation by REXX.  Moreover, to minimize system overhead
  377. and increase speed, /PROTECT *should* be used whenever the REXX
  378. procedure does not produce any alteration of S/G contents (see, e.g.,
  379. frame FIND2 in REXXPL.U2).
  380.  
  381. Demo [8] shells to REXX to display the contents of the entire range of
  382. programming S/Gs 01-1999 (contents longer than 70 characters are
  383. abbreviated).  Since the function is merely to display S/G contents,
  384. not change them, we invoke /PROTECT.  This demo also illustrates R2X's
  385. acceptance of various O2 switches.  (The routine takes several seconds
  386. to collect S/G contents prior to display.)
  387.  
  388. ;*; [8] 
  389.  ü«SV50, "RexXPL!" /f /h /p:Xy /win /max /protect
  390.  
  391. /* xy.01#1999 */
  392.  
  393. DO i=01 to 1999
  394. if length(i)<2 then i='0'||i
  395. if length(xy.i)<1 then iterate
  396. if length(xy.i)>70 then xy.i=left(xy.i,70)'...'||CrLf||,
  397.   '...'||substr(xy.i,length(xy.i)-70,)
  398. say 'S/G 'i':'
  399. say xy.i
  400. say '-------------------------'
  401. say
  402. parse value SysCurPos() with row col
  403. if row>19 then do
  404.   say 'Press a key to continue . . . '
  405.   call SysGetKey 'noecho'
  406.   call SysCls
  407.   end
  408. END i
  409. » éú2.r2x é«PRDone»«EX»
  410. --------------------------
  411.  
  412. * * * * *                                    
  413.  
  414. R2X grafts a range of new possibilities onto XPL.  Your XyWrite
  415. routines now have ready access to a wealth of OS/2 system information. 
  416. Demo [9], for example, calls two RexxUtil functions (SysDriveInfo and
  417. SysDriveMap) to add (i) the boot drive, (ii) the RAMdrive (if present,
  418. else the boot drive), and (iii) the last drive to three filenames:
  419.  
  420. ;*; [9] 
  421.  ü«SV01,MYFILE.1»«SV02,MYFILE.2»«SV03,MYFILE.3»;*; ;*;  éú2.r2x«SV50,
  422.  
  423. call SysIni "BOTH","FolderWorkareaRunningObjects","ALL:","Objects"
  424. BootDrive=translate(left(Objects.1,2))
  425.  
  426. RAMDrive=BootDrive
  427. if pos('OS2VDISK',SysDriveInfo(right(SysDriveMap(),2)))>0 then,
  428.  RAMDrive=right(SysDriveMap(),2)
  429.  
  430. LastDrive=right(SysDriveMap(),2)
  431.  
  432. xy.01=BootDrive||'\'||xy.01
  433. xy.02=RAMDrive||'\'||xy.02
  434. xy.03=LastDrive||'\'||xy.03
  435.  
  436. xy.01=xy.01||' '||xy.02||' '||xy.03
  437.  
  438. » é«PR@01»«EX»
  439. --------------------------
  440.  
  441. Further, RexXPL can be enlisted to perform operations that are
  442. difficult or impossible in conventional XPL.  For instance:
  443.  
  444. We can generate random numbers...
  445.  
  446. ;*; [10]
  447. «LBa»«PR|Press a key to roll the dice [Esc quits]»«SX01,«RK»»«IF«VA$KC»>1» ü«PR »;*;
  448. ;*;
  449.  éú2.r2x«SV50,
  450.  
  451. roll=random(2,12)
  452. article='a '
  453. select
  454.   when roll=2 then do
  455.     roll='"snake eyes" ('||roll||')';article=''
  456.     end
  457.   when roll=7 then roll='SEVEN!!!!'
  458.   when roll=8 then do
  459.     roll='"box cars" ('||roll||')';article=''
  460.     end
  461.   when roll=11 then article='an '
  462. otherwise Nop
  463. end
  464.  
  465. xy.01='You rolled '||article||roll||'!'
  466.  
  467. » é ü ü? «PV01»«GLa»«EI» ü Ç}«PRDone»«EX»
  468. --------------------------
  469.  
  470. ... or assign "hot" control characters to S/Gs...
  471.  
  472. ;*; [11]
  473.  éú2.r2x«SV50,
  474.  
  475. xy.01=x2c('1A')
  476.  
  477. » é«PRHere's Ascii-26 (End of File): @01»«EX»
  478. --------------------------
  479.  
  480. ... or instantly generate all of XyWrite's 3-byte functions...
  481.  
  482. ;*; [12]
  483.  éº é½(es 1) üA«IF«VA$WA»<1»«IF«VA$WS»<>1»«PRNo file»«EX»«EI»«PRNo window available»«EX»«EI»«SX01,«CP»»«PRWorking...»;*;
  484. «SV50,
  485.  
  486. xy.02=''
  487. byte1=x2c('FF')
  488. do i=128 to 130
  489.   do j=1 to 255 by 2
  490.   if i=130 & j=249 then leave
  491.   xy.02=xy.02||byte1||d2c(i)||d2c(j)
  492.    end
  493.   end
  494. xy.02=xy.02||CrLf
  495.  
  496. »;*;
  497.  éú2.r2x é«IF«VA$WA»<1» Ç} ü¡«GLa»
  498. «EI» é½(ne/100)«SX01,1»«LBa»«GT02» é½(jmp «PV01») ü?«PRDone!»«EX»
  499. --------------------------
  500.  
  501. The possibilities are endless....
  502.  
  503. Bug reports and suggestions for practical applications are welcomed.
  504.  
  505. Enjoy!
  506.  
  507. --------------
  508. Carl Distefano
  509. CLDistefano@worldnet.att.net
  510. http://www.serve.com/xywwweb/
  511.  
  512.  
  513. Revision History
  514. ================
  515. 01/20/98:  FIND2 - CMline not visible during final PRompt
  516. (v2.011)     --fixed
  517.  
  518. 01/15/98:  Public release of version 2 with minor corrections and
  519. (v2.01)      improvements, revised documentation, and a new file-finder
  520.              utility
  521.  
  522. 09/23/96:  Complete rewrite of original code to enable processing of
  523. (v2.00)       larger REXX programs (beta)
  524.  
  525. 07/21/96:  Revised|expanded edition, following public release
  526. (v1.20)      of Xy-OS/2 Shell
  527.            Switches for R2 and R2X must be placed in argument (S/G 50),
  528.              not framename, for consistency with O2 usage and to avoid
  529.              anomalies associated with long framenames
  530.            Execution via O2 rather than OS2EXEC is automatic when any
  531.              STARTOS2|O2 switch is present
  532.            RexXPL recognizes ordinary S/Gs (A-Z|0-9)
  533.            Alarm applet added to REXXPL.U2
  534.            REXXPL.DOC includes structured, commented code listing
  535.              for R2 and R2X (see Appendix below)
  536.  
  537. 06/30/96:  Interim revision (unpublished)
  538. (v1.11)    
  539.  
  540. 05/13/96:  R2X uses OS2EXEC, by Eberhard Mattes, for Rexx processing
  541. (v1.10)    Switch /S enables keyboard input in Rexx session (via Shell)
  542.  
  543. 04/28/96:  R2X recognizes S/G 00 (XY.00)
  544. (v1.02)    Enabled SIGNAL EXIT instruction for Rexx code with multiple
  545.              exit points, to permit updating of S/G contents before
  546.              return to XyWrite
  547.  
  548. 04/25/96:  R2X EXits absolute (<EX1>) on error, to avoid superfluous
  549. (v1.01)      call to R2
  550.            Minor revisions to REXXPL.DOC
  551.  
  552. 04/20/96:  Original version (limited release)
  553. (v1.00)
  554.  
  555.     ⁿ¬ --------------------------------------------------------------  ⁿ¬
  556.    |  RXXPL201.ZIP AND ITS CONSTITUENT FILES ARE FREEWARE, AND MAY  |
  557.    |  BE FREELY DISTRIBUTED.  THEY ARE FURNISHED "AS IS", WITH NO   |
  558.    |  WARRANTIES OF ANY KIND WHATSOEVER.  YOU ASSUME ALL RISKS      |
  559.    |  ASSOCIATED WITH THEIR USE, OPERATION AMD DESIGN.              |
  560.     ⁿ¬ --------------------------------------------------------------  ⁿ¬
  561.