Steve McCrystal wrote in a message to Jack Stein:
SM> And, on a related note, this code (kindly supplied by Mike Ruskai a
SM> week or so ago) will work in OREXX but not in CREXX, even tho the
SM> routine in question is part of REXXUTIL:
SM> === Cut ===
SM> /* strip EA's from files */
SM> call SysFileTree '*.*','files.','FO'
SM> call SysFileDelete 'eajunk'
SM> do i=1 to files.0
SM> '@eautil "'||files.i||'" eajunk /s'
SM> call SysFileDelete 'eajunk'
SM> end
SM> === Cut ===
SM> This fails with an error message (function not defined, I think) in
SM> line 2.
I modified the code above to include loading the REXXUTIL functions and it
seems to work just fine here under CREXX. Actually, I loaded the REXX FTP
functions as well since that is part of the boilerplate. The code to unload
the functions after use is not included since I never bother to unload them.
Too many pieces of my REXX code make use of them to bother with continual
loading/unloading -- especially when you unload the functions from one thread
while another thread is making use of them.
-----------------------8<-cut-here--------------------------------------
/*------------------------------------------------------------------
* load the REXX FTP and Sys functions, (if needed)
* for the most part, these are loaded once and left loaded
*------------------------------------------------------------------*/
if RxFuncQuery("FtpLoadFuncs") then
do
rc = RxFuncAdd("FtpLoadFuncs","RxFtp","FtpLoadFuncs")
rc = FtpLoadFuncs()
end
if RxFuncQuery("SysLoadFuncs") then
do
rc = RxFuncAdd("SysLoadFuncs","RexxUtil","SysLoadFuncs")
rc = SysLoadFuncs()
end
/* strip EA's from files */
call SysFileTree '*.*','files.','FO'
call SysFileDelete 'eajunk'
do i=1 to files.0
'@eautil "'||files.i||'" eajunk /s'
call SysFileDelete 'eajunk'
end
-----------------------8<-cut-here--------------------------------------
Regards,
David
--- timEd/2 1.10.y2k+
* Origin: Frog Hollow -- a scenic backroad off the Infobahn (1:153/290)
|