×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Hi Albert,
Thanks Scott. I made the change and it works great. Now how do I execute
it in QSH? I looked on the internet but I can't find it.
To run a program from Qshell, all you do is type it's path name, the only
trick is, it must be an IFS-style path name.
So if you write a program named 'ATTRIB' and it's located in library QGPL,
you'd run it from QShell by typing:
/qsys.lib/qgpl.lib/attrib.pgm
to pass parameters, you just list them (separated by spaces) after the
program name.
/qsys.lib/qgpl.lib/attrib.pgm parm1 parm2 parm3
In your case, I recommend using Qshell's find utility to run your program
repeatedly (once for each file you want to reset the attributes on.) If
so, you'd do this:
find /path/to -exec /qsys.lib/qgpl.lib/attrib.pgm {} \;
(Obviously, you can change the library or program name in the command line
above to suit your needs)
The 'find' utitility will find every object in every directory (or
subdirectory) within /path/to. For each one that it finds, it'll call
your attrib.pgm program, and pass the filename as a parameter.
It might be a little slow -- but as a one-time shot, this is a lot easier
than writing code to list all of the files in the directory or
subdirectory and then manually calling the attrib program for each one.
As an Amazon Associate we earn from qualifying purchases.