Re: spool to symbol in vms

  • From: "Barbara Baker" <barb.baker@xxxxxxxxx>
  • To: "Jesse, Rich" <Rich.Jesse@xxxxxx>
  • Date: Fri, 8 Sep 2006 10:18:57 -0600

Rich:
This works wonderfully!  Don't know why I struggled so long with symbols.
The logical works so well, and it's nice and clean.

Bruce:
redefining sys$output also works.  Rich is correct - there's some extra
stuff in there I'd need to filter out.
But I can see some instances where this would really work great.

Kudos to you both!
Thanks for your responses.
Barb

On 9/8/06, Jesse, Rich <Rich.Jesse@xxxxxx> wrote:

Not exactly like Unix (better!)...

Instead of spooling to a symbol, spool to a *logical*.  I know this works
(or did in Oracle8 on VMS), as I used to use it with a DCL CGI script I made
to produce graphs from data in Oracle tables.  But I don't know how Oracle
will treat the filename as part of the logical.  Try something like this:

  $ val_sid = f$trnlnm("ora_sid")
  $!
  $ sho sym val_sid
  $!   tmp = "tmp_"+"''val_sid'"+".txt"
  $!   sho sym tmp
  $   define tmp "tmp_''val_sid'.txt"
  $ sqlplus "/ as sysdba"
     spool tmp
     select '$ STOP/IDENTIFICATION=' || p.spid proc_id from v$session s,
v$process
. . . . .
If that doesn't work as you expect, you could also try to append a colon
onto the spool command ("spool tmp:").  Like I said, I'm not sure how Oracle
will deal with the filename in the logical.  It's been awhile!

Let us know if that works.  GL!

Rich

Other related posts: