Home | OS/2 Software | Rexx | Adding and Deleting Common Libraries (Beginning level)

Adding and Deleting Common Libraries (Beginning level)

Contributed by: Doug Rickman, Global Hydrology and Climate Center, MSFC, NASA

This is aimed at beginning REXX users. The code loads and releases various common libraries.


 


/*****************************************************************************/
/*************************** Add Libraries  **********************************/

if rxfuncquery('sysloadfuncs') then do           /* this will start rexxutil */
   CALL RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
   CALL SysLoadFuncs
   end
if rxfuncquery('rexxlibregister') then do         /* this will start rexxlib */
   call rxfuncadd 'rexxlibregister', 'rexxlib', 'rexxlibregister' 
   call rexxlibregister
   end
if rxfuncquery('w_register') then do           /*  rexxutil window functions */
   call rxfuncadd 'w_register', 'rxwin30', 'rxwindow'
   call w_register
   end
if rxfuncquery('FileLoadFuncs') then do          /* this will start filerexx */
   CALL RxFuncAdd 'FileLoadFuncs', 'FILEREXX', 'FileLoadFuncs'
   CALL FileLoadFuncs
   end
if rxfuncquery('rxuinit') then do                      /* this will start rxu */
   call rxfuncadd 'rxuinit','rxu','rxuinit'          
   call rxuinit
   end
if  rxfuncquery('VpUtilLoadFuncs') then do   /*load VisPro Utils (semaphores)*/
   call RxFuncAdd 'VpUtilLoadFuncs', 'VPUTIL', 'VpUtilLoadFuncs' 
   call VpUtilLoadFuncs
   end
if rxfuncquery('FtpLoadFuncs') then do                 /* load ftp functions */
   rc = RxFuncAdd("FtpLoadFuncs","rxFtp","FtpLoadFuncs")
   rc = FtpLoadFuncs()
   end
if rxfuncquery('VInit') then do                      /* load VREXX functions */
   rc=RxFuncAdd('VInit', 'VREXX', 'VINIT')
   InitCode=VInit()
   if initcode = 'ERROR' then signal VREXXCleanup
   end
if rxfuncquery('IPCLoadFuncs') then do                 /* load IPC functions */
   call RxFuncAdd 'IPCLoadFuncs', 'REXXIPC', 'IPCLoadFuncs'
   call IPCLoadFuncs
   end


/*****************************************************************************/
/**************************** Delete Libraries *******************************/

rc=sysdropfuncs()         /* drops     rexxutil */
rc=rexxlibderegister()    /* drops     rexxlib  */
rc=filedropfuncs()        /* drops     filerexx */
rc=rxuterm()              /* drops     rxu      */
rc=ftpdropfuncs()         /* drops     ftp      */


/* --------------------------------------------------------------------------*/
/* --- begin subroutine - VREXXCleanup:                         -------------*/
VREXXCleanup:
call VExit
/* --- end  subroutine  - VREXXCleanup:                         -------------*/
/* --------------------------------------------------------------------------*/