home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rxlepsom.zip / Template.cmd < prev    next >
OS/2 REXX Batch file  |  1995-09-18  |  1KB  |  49 lines

  1. /* rexx */
  2.  
  3. /* Correct the following assignment: 
  4.     tst.log should be assigned the name of the log file
  5. */
  6. tst.log='Template.log'
  7. signal on syntax name ErrExit
  8.  
  9. call RxFuncAdd 'LepSomLoadFuncs', 'rxlepsom', 'LepSomLoadFuncs'
  10. call LepSomLoadFuncs
  11.  
  12. parse arg args
  13. n=words(args)
  14. call lineout tst.log,'Arguments are ='args
  15. do i=1 to n 
  16.     argv.i=word(args,i)
  17. end 
  18.  
  19. lepAA=LepAAnew(argv.1)
  20. if LepGetClassName(lepAA)\='LEPArgumentsArray' then do
  21.     cr=x2c('0D');
  22.     msg='Internal error in 123REXX.DLL RexxAddMacro function.'
  23.     msg=msg||cr||'Please contact us to inform about the conditions of this error.'
  24.     LepDisplayError(msg);
  25. end
  26.  
  27. argNum=LepAAGetByNo(lepAA)
  28. lepArg.0=argNum
  29. do i=1 to argNum
  30.     lepArg.i=LepAAGetByNo(lepAA, i-1) /* Lep arguments are 
  31.                     enumerated starting from 0 */
  32.     call lineout tst.log, 'lepArg.'i' is a 'LepGetClassName(lepArg.i)
  33. end
  34.  
  35. /******************************************************************************/
  36. /*                Insert your code here                                       */
  37. /******************************************************************************/
  38.  
  39. /* .... */
  40.  
  41. return
  42.  
  43. ErrExit:
  44.  msg='Error '||rc||' occured at line '||sigl||': '||errortext(rc)
  45.  call lineout tst.log, msg
  46.  rcod=LepDisplayError(msg)
  47. return
  48.  
  49.