home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / upmacr.txt < prev    next >
Text File  |  1995-03-29  |  2KB  |  28 lines

  1. /*      A  ReXX Program called UPMACRO.CMD
  2. *       Author:  Graham Pinnoy
  3. *       Purpose: Signs on to TSO with my SCxxxxx and password and then
  4. *                uploads a PRN file to the Mainframe using Communications Manager
  5. *       Created: March 10, 1995
  6. */
  7.                        
  8.  
  9. ret_code = Rxfuncadd('HLLAPI','SAAHLAPI','HLLAPISRV')                          /* Registers the dynamic link library */
  10. /* ret_code = 0 (registered) > 0 (not registered)                          */
  11. session_id = 'TSO SC77777'                                                     /*   My TSO sign on # SCxxxxx   */
  12.                                                                                /*   This is used by all later  */
  13.                                                                                /*   hllapi calls */
  14. ret_code = hllapi('Connect' ,session_id)                                       /*   Connect to host   */
  15.              if rc > 0  then do
  16.                           say  ' No connection took place.  RC =' rc
  17.                           signal quit
  18. ret_code = hllapi('Send_file',"C:\myfile.prn,'ldfip.fis.buddata(abc')/SAYHI"    /*  Sends a file from a PC to a host computer  */
  19.  
  20. end
  21. quit :
  22.         Say  'Disconnecting the session..'
  23.          ret_code = hllapi('disconnect')
  24.          if  ret_code = 0 then say  'Successfully disconnected'
  25.             else say 'Disconnection unsuccessful'
  26.           hllapi('reset_system')    /*     reset back to the defaults */
  27.           return
  28.