ADSM-L

Re: Scripts output

2005-04-03 11:13:36
Subject: Re: Scripts output
From: Robert Ouzen <rouzen AT UNIV.HAIFA.AC DOT IL>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Sun, 3 Apr 2005 18:12:52 +0300
Richard

Thank you very much .... Just what I needed

Regards Robert 

-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of 
Richard Sims
Sent: א 03 אפריל 2005 16:03
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: Scripts output

On Apr 3, 2005, at 6:44 AM, Robert Ouzen wrote:

> Hi to all
>
> Did is a way to retrieve  from the database all my scripts I created 
> in one run , I meant not just the output of all the script in one file 
> that I can get running:
>
>     q script  f=r outputfile=my.script
>
> But every  script by himself (name and contains) , I have a lot of 
> scripts and I don't want to run an output  one by one as:
>
>  q script bla.bla f=r > bla.bla
>
> My TSM Server Version is 5.2.4.2 on Aix/RS 6000

My longstanding recommendation regarding server scripts is that they be 
maintained as individual files in the OS file system, outside the TSM server, 
and then after changes replace the server copy via 'DELete SCRipt' and then 
'DEFine SCRipt ... File=...'. That would inherently provide what you are 
seeking, with zero extra effort, also affording the benefit of having a safety 
copy of your server scripts which can be readily reviewed and maintained.

A first alternative is to maintain a prolog at the top of each server script 
which, in the combined stream from your 'q script  f=r outputfile=my.script', 
will allow you to readily split that output file into representative script 
files. (Documentation prologs are highly
recommended.)

A second alternative is to formulate a Select to generate a macro which you can 
then run to individually generate individual output files. That is, you run a 
Select which causes tailored Query Script commands to be generated in a single 
macro, which you can thereafter edit to strip off the inevitable column 
headings and then run. Play with the following to suit your needs:

SELECT DISTINCT 'Query SCRipt' as "             ", -
  NAME as "                                 ", -
  'Format=Raw O=' as "             ", -
  NAME as "                                 " -
  FROM SCRIPTS > /var/tmp/query.macro

         Richard Sims      http://people.bu.edu/rbs

<Prev in Thread] Current Thread [Next in Thread>