ADSM-L

Re: Generting Commands from a Script

2001-01-24 14:42:44
Subject: Re: Generting Commands from a Script
From: "Thomas A. La Porte" <tlaporte AT ANIM.DREAMWORKS DOT COM>
Date: Wed, 24 Jan 2001 11:44:19 -0800
select 'move data ' || volume_name -
  from volumes -
where upper(stgpool_name)='LNTAPECO' -
   or upper(stgpool_name)='LNTAPENO' -
   or upper(stgpool_name)='UNTAPECO' -
   or upper(stgpool_name)='UNTAPENO' -
   or upper(stgpool_name)='NTTAPECO' -
   or upper(stgpool_name)='NTTAPENO'
  and pct_utilized <50

You'll probably need to set sqldisplaymode to wide, or if you run
it in batch to commadelimited or tabdelimited. Redirect the
output to a file and you've got a macro file that you can run.

 -- Tom

Thomas A. La Porte
DreamWorks SKG
tlaporte AT anim.dreamworks DOT com

On Wed, 24 Jan 2001, Joseph Marchesani wrote:

>Group
>
>I have created a script name VOLUME_PCT with the following results:
>
>ANR1461I RUN: Executing command script VOLUME_PCT.
>ANR1466I RUN: Command script VOLUME_PCT, Line 5 : select volume_name, 
>stgpool_name,pct_utilized from volumes
>where upper(stgpool_name)='LNTAPECO' and pct_utilized <50 or 
>upper(stgpool_name)='LNTAPENO' and pct_utilized <50
> or upper(stgpool_name)='UNTAPECO' and pct_utilized <50 or 
> upper(stgpool_name)='UNTAPENO' and pct_utilized <50
> or upper(stgpool_name)='NTTAPECO' and pct_utilized <50 or 
> upper(stgpool_name)='NTTAPENO' and pct_utilized <50.
>
>VOLUME_NAME            STGPOOL_NAME           PCT_UTILIZED
>------------------     ------------------                   ------------
>A40004                 NTTAPECO                                8.1
>A40012                 UNTAPENO                                2.0
>A40015                 NTTAPENO                               48.0
>A40021                 NTTAPENO                              32.9
>A40081                 NTTAPECO                               47.4
>A40156                 NTTAPECO                              15.4
>
>ANR1494I RUN: Command return code is 0.
>ANR1487I RUN: Command return code is RC_OK (OK).
>ANR1462I RUN: Command script VOLUME_PCT completed successfully
>
>My question is how can I generated MOVE DATA commands using the VOLUME_NAMEs 
>in the results of the above SCRIPT
>
>Thanks
>
>Joe Marchesani .
>
>
<Prev in Thread] Current Thread [Next in Thread>