VMS, Oracle SQL*Menus, SYS$INPUT problem
Date: 16 Aug 93 10:18:15 EDT
Message-ID: <1993Aug16.101815.1_at_ocvaxc.cc.oberlin.edu>
Well, here's the scoop on that SYS$INPUT and SYS$COMMAND thing that was being caused by calling my com file from Oracle SQL*Menus:
The problem:
I have a comfile used to precompile, compile and link PRO*C and PRO*Cobol
programs for use with Oracle. When I call the comfile, which includes a
create statement for a temporary data file, it works interactively, but
when run from SQL*Menus, it comes back to the terminal for input to the
create statement. SQL*Menus redefines sys$input to be sys$command.
Previously, I mistakenly thought that my attempt to redefine sys$input was fixing the problem, but only if I included other things, like "$show logical sys$input" and I now know that it was the $show itself that was reassigning the sys$input logical and fixing my problem.
As it stands now:
It works both interactively and from SQL*Menus, but I'm not happy with the
solution.
The important part of the code looks like this:
$! more code precedes this ... $!------------------------------------------------------------------------------ $! Create Temporary Data File of Module Information $!------------------------------------------------------------------------------
$ write sys$output "sys$input = "+f$trnlnm("sys$input")
$ if f$trnlnm("sys$input") .eqs. "SYS$COMMAND"
$ then
$ write sys$output "Deassigning sys$input logical that Oracle changed...."
$ define sys$output nl:
$ sho log sys$input ! because show runs an image which reassigns sys$input
$ deassign sys$output
$ write sys$output " sys$input = "+f$trnlnm("sys$input")
$ endif
$ create or_temp:orsj0200_'user'.dat
MODULE:AR1P0700,LANG:CO,SYS:AR,SUB:N,UEXIT:N,MACHINE:VAXC,SPEC:Y MODULE:AR1P2000,LANG:CO,SYS:AR,SUB:N,UEXIT:N,MACHINE:VAXC,SPEC:Y $! more data and code follows...
If I run it interactively, the output looks like this:
OCVS1> _at_orsj0200 module:fasp0070
Module specified: FASP0070
sys$input = _OCVS1$DKA0:
Updating FASP0070
Pro*C: Release 1.5.6.2.0 - Production on Mon Aug 16 09:52:57 1993
Copyright (c) Oracle Corporation 1979, 1992. All rights reserved.
Precompiling fa_src:fasp0070.PC
- Linking FASP0070.EXE
If I run it from SQL*Menus, the output looks like this:
Module specified: FASP0070
sys$input = SYS$COMMAND
Deassigning sys$input logical that Oracle changed....
sys$input = _OCVS1$DKA0:
Updating FASP0070
Pro*C: Release 1.5.6.2.0 - Production on Mon Aug 16 09:51:46 1993
Copyright (c) Oracle Corporation 1979, 1992. All rights reserved.
Precompiling fa_src:fasp0070.PC
- Linking FASP0070.EXE
There's got to be a nicer way to re-assign the proper value of sys$input. Running some superfluous image seems really kludgey. Can someone tell me what the right way is to do this.
"$deassign sys$input" takes me back to the terminal (_NTY167:), and not back to "_OCVS1$DKA0:" which as it turns out is some VMS representation of the command file. I also tried:
$ define sys$input _OCVS1$DKA0:
But that didn't work.
Thanks,
Jennifer Amon
bamon_at_ocvaxc.cc.oberlin.edu
Received on Mon Aug 16 1993 - 16:18:15 CEST