× 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.



It was a little slow but it worked perfectly. And now the rm command is working and the folder is being deleted.

Scott, as usual you have come up with the answer. You are a treasure in the iSeries community and I really appreciate the help that you gave me. On top of that I have learned a great deal about using qshell.

I hope you have a great weekend!

Albetr

----- Original Message -----
From: "Scott Klement" <midrange-l@xxxxxxxxxxxxxxxx>
To: "Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
Subject: Re: Deleting a folder from the IFS
Date: Fri, 31 Aug 2007 16:28:56 -0500 (CDT)



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 is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.





As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

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