|
1. Is there a way to tell the AS/400 copy all files, *all perhaps, within a given directory to a file/lib/mbr?...perhaps to a lib only instead of to a specific file and create the files dynamically based on names in the IFS?
2. Thru a CL program is there a way to do something like read out all file names within a directory and call the CPYFRMSTMF cmd for each file name??
I'm looking to automate these steps thru a CL and OS/400 scheduler. Any thoughts or insight would be greatly appreciated.
You could do it with a .bat or .cmd file (if you're on a PC): if Exists aNameList.dat goto test2 goto run
test2: if Exists Running.mkr goto conflict if Exists ListDone.mkr goto rmlist goto run
rmlist: del ListDone.mkr
run: For %%A in (X:\Foldername\*.txt) Do Echo %%A > aNameList.dat echo Namelist build succeeded goto done
conflict: echo Process is running. Can't do it now
Pete Hall pbhall@xxxxxxxxxxxxx http://www.pbhall.us/
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.