MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » October 2012

RE: Deleting the contents of a directory in the ifs



fixed

Thanks John
I will also try this

Alan Shore
Programmer/Analyst, Direct Response
E:AShore@xxxxxxxx
P:(631) 200-5019
C:(631) 880-8640
"If you're going through Hell, keep going" - Winston Churchill


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jim Essinger
Sent: Thursday, October 04, 2012 4:34 PM
To: Midrange Systems Technical Discussion
Subject: Re: Deleting the contents of a directory in the ifs

Alan,

Not a problem. I do the RMV in a CL program, _and_ have QSHELL scripts that do similar with the RM (remove) command. The scripts reside in a file on the IFS (on our system in the /QSHELL directory) called DltInv.qsh.

The statement used to remove is listed in the script as

# delete any files.
# Any error messages are redirected to NULL and deleted rm /homedir/Invoice/* 2> /dev/null

submit the qshell script:

SBMJOB CMD(QSH CMD('/QShell/DltInv.qsh')) +
JOB(DltInv) JOBD(*USRPRF) JOBQ(WEBALL) +
USER(*CURRENT) LOG(4 0 *SECLVL) +
LOGCLPGM(*YES)

OR run the command in your CL program:

qsh cmd('/qshell/DltInv.qsh')


OR

Could also be done in CL with

RMVLNK OBJLNK('/homedir/Invoice/*)

and monitor for specific error messages. You can prompt RMVLNK, press help
(F!) and see what messages can be monitored for.

Jim

On Thu, Oct 4, 2012 at 2:16 PM, Alan Shore <ashore@xxxxxxxx> wrote:

John, Jim
Thanks for your replies, however (and I have no one to blame but
myself) the whole process is in a batch program and not interactive.


Alan Shore
Programmer/Analyst, Direct Response
E:AShore@xxxxxxxx
P:(631) 200-5019
C:(631) 880-8640
"If you're going through Hell, keep going" - Winston Churchill


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:
midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Jim Essinger
Sent: Thursday, October 04, 2012 4:13 PM
To: Midrange Systems Technical Discussion
Subject: Re: Deleting the contents of a directory in the ifs

Alan,

CL command RMVLNK is one way, unless there are subdirectories. You
can also use WRKLNK and navigate to the directory in which your files
and directories live and edit (option 2) the directory. Then option 9
of the edit function will do a recursive delete of directories, which
will delete the directory and all sub-directories.

Jim

On Thu, Oct 4, 2012 at 1:57 PM, Alan Shore <ashore@xxxxxxxx> wrote:

Hi everyone
I am making a change to our system (release V5r4) where files are
being loaded to a directory in the ifs, and so far (with the
tremendous help of this list) I am accomplishing what I set out to do.
However, at the start of this process I need to clear out the
directory of EVERYTHING.
Does anyone know how to do this?
I am assuming the Qshell is the best way to go (which may or may not
be true), but it's been quite a few years since I last did ANY UNIX
so the more that I delve into this, the more that I realize just how
much I have forgotten (or didn't know)

Alan Shore
Programmer/Analyst, Direct Response
E:AShore@xxxxxxxx
P:(631) 200-5019
C:(631) 880-8640
"If you're going through Hell, keep going" - Winston Churchill


Disclaimer: This message contains confidential information and is
intended only for the individual named. If you are not the named
addressee you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately by e-mail if you have received
this e-mail by mistake and delete this e-mail from your system.
E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive
late or incomplete, or contain viruses.
The sender therefore does not accept liability for any errors or
omissions in the contents of this message, which arise as a result
of e-mail transmission. If verification is required please request a
hard-copy version. Any views or opinions presented are solely those
of the author and do not necessarily represent those of the company.
--
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.


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


Disclaimer: This message contains confidential information and is
intended only for the individual named. If you are not the named
addressee you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately by e-mail if you have received
this e-mail by mistake and delete this e-mail from your system. E-mail
transmission cannot be guaranteed to be secure or error-free as
information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.
The sender therefore does not accept liability for any errors or
omissions in the contents of this message, which arise as a result of
e-mail transmission. If verification is required please request a
hard-copy version. Any views or opinions presented are solely those of
the author and do not necessarily represent those of the company.
--
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.


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


Disclaimer: This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.





Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact