ADSM-L

Re: A macro with background processes?

1997-12-17 14:32:53
Subject: Re: A macro with background processes?
From: MARK SIMONDS <msimond AT USWEST DOT COM>
Date: Wed, 17 Dec 1997 12:32:53 -0700
I am also interested in doing this. If process numbers do not repeat
themselves,
this should also work?????
Forgive any syntax errors, I have not run this.


----------------------------------
#!/bin/sh
#!/bin/sh
chk4done ()
{
while true ; do
        q proc $1 >/dev/null 2>/dev/null
        if [ $? -eq 11 ];then  # 11 = no process found
                break
        fi
        sleep 10
done
}
CMD=`checkin library DLT2500 search=yes status=private | grep "Process
number" | awk '{print $4}'`
chk4done $CMD
CMD=`delete volhist todate=today-7 type=dbbackup | grep "Process number"
| awk '{print $4}'`
chk4done $CMD
CMD=`backup db devclass=DLT type=full vol=BACK01 | grep "Process number"
| awk '{print $4}'`
chk4done $CMD
CMD=`checkout libvol DLT2500 BACK01 remove=no | grep "Process number" |
awk '{print $4}'`
chk4done $CMD
------------------------------------
Ingo Steller wrote:
Ingo Steller wrote:
>
> Hi,
>
> I would like to do something like the following in a macro to be scheduled
> as an administrativ command:
>
> checkin library DLT2500 search=yes status=private
> delete volhist todate=today-7 type=dbbackup
> backup db devclass=DLT type=full vol=BACK01
> checkout libvol DLT2500 BACK01 remove=no
>
> The problem is, that 3 out of the four commands will be processed in
> backgroud. Therefore, the macro does not work, because I cannot do a backup
> db until the volume is checked in.
>
> The reason for this script is to have a databse backup, that will be
> checked out of the database done by someone, who does not have to know
> something about ADSM. If anyone has a solution for this problem instead for
> the script above, I would ike to hear about this too.
>
> Gruesse - Best regards
>
> Ingo Steller
> CompuNet Essen
>
> Severinstrasse 42, 45127 Essen, Germany
> Phone: +49 (0)201/2012-291, Fax: +49 (0)201/2012-230,
> Internet: ingo.steller AT gecits-eu DOT com

--
  Mark Simonds
  Mark Simonds
  U.S. West  ~  Life's Better Here
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
UNIX System Technologist - EWEBARS Team | (303)624-3482 |
msimond AT uswest DOT com
<Prev in Thread] Current Thread [Next in Thread>