home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rxapfd.zip / rc2.cmd < prev    next >
OS/2 REXX Batch file  |  1993-10-16  |  636b  |  26 lines

  1. /* Rexx */
  2.  
  3. Signal On Syntax
  4.  
  5. Parse Arg pq, tpid, convid
  6.  
  7. convtype = 'mfn'    /* mapped, full-duplex, non-blocking */
  8. rswd = 'y'
  9.  
  10. /* Route incoming data from APPC into a PmPrintf window */
  11. appcrc = rxappc('Receive_and_Wait',convtype,tpid,convid,rswd,10000,'inf.')
  12. Do While appcrc = 0
  13.   if left(inf.2,1) = 'D' then
  14.     call rxpmprintf pq,Cryption(inf.5)
  15.   appcrc = rxappc('Receive_and_Wait',convtype,tpid,convid,rswd,10000,'inf.')
  16. End
  17.  
  18. Return
  19.  
  20. Cryption:
  21. Return BitXor(Arg(1),Copies('ff'x,Length(Arg(1))))
  22.  
  23. Syntax:
  24. Call rxpmprintf pq,ErrorText(rc)'0d0a'x||sourceline(sigl),'Rexx Syntax Error at line' sigl
  25. Exit
  26.