home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rxgwa1.zip / functest.cmd next >
OS/2 REXX Batch file  |  1993-03-11  |  759b  |  20 lines

  1. /* REXX                                                        */
  2. /*                                                             */
  3. /*  Use e2a() (EBCDIC to ASCII) and a2e() (ASCII to EBCDIC)    */
  4. /*  the same way you would use stardard rexx functions such    */
  5. /*  as x2d() or c2x()                                          */
  6. /*                                                             */
  7. if rxfuncquery('a2e') then
  8.    call rxfuncadd 'a2e','rxgwa','a2e'
  9. if rxfuncquery('e2a') then
  10.    call rxfuncadd 'e2a','rxgwa','e2a'
  11.  
  12. ebcdic = 'πêëó@ëó@üò@┼┬├─╔├@óúÖëòç@'
  13. ascii  = 'This is an ASCII string'
  14.  
  15. say e2a(ebcdic)'... converted to ASCII'
  16. say a2e(ascii)'..... converted to EBCDIC'
  17. say e2a(a2e(ascii))'..... converted back to ASCII'
  18.  
  19. exit
  20.