home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rxfnset.zip / RXSFH.CMD < prev    next >
OS/2 REXX Batch file  |  1995-11-05  |  912b  |  31 lines

  1. /* */
  2. Say "Sample Rexx program for demonstrating RXSETFH function"
  3. Say "RxFnSet by Leshek Fiedorowicz"
  4. Say
  5.  
  6. Arg Number
  7.     Call RxFuncDrop 'RXSETFH'
  8.  
  9.     Call RxFuncAdd 'RXSETFH', 'RXFN32', 'RXSETFH'
  10.  
  11.     Call RXSETFH Number
  12.  
  13.     select;
  14.       when result = 0 then 
  15.          say Number' of File Handles succesfully allocated.'
  16.       when result = 8 then 
  17.          say 'ERROR - Not enough memory.'
  18.       when result = 87 then do
  19.             say 'ERROR - Invalid parameter ('Number').'
  20.             say '        Specified parameter was not valid number or is less'
  21.             say '        then Number of File Handles already available.'
  22.          end
  23.       Otherwise 
  24.          say 'ERROR - DosSetMaxFH function returned 'result'.'
  25.          say '        Check your Control Program Programming Reference'
  26.          say '        for details.'
  27.     end;
  28.  
  29.     Call RxFuncDrop 'RXSETFH'
  30. Exit
  31.