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.


This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 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.