Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Forcing decode() evaluation
Granted I am more of a C programmer than a SQL*PLUS programmer, maybe
that is where I am having my problem.
I have the following lines of code that do work.
rem define cheat2="PRINT/QUEUE=&&cheat1 /COPIES=&&ask_copies
DIFFUSION_PASSDOWN.LIS"
rem host &&cheat2
define ask_Printer = 1
define ask_copies = 1
define a='decode(&&ask_Printer,1,"ANSI_M11PS1")'
define b='&&a'
host PRINT/QUEUE='&&a' /COPIES=&&ask_copies DIFFUSION_PASSDOWN.LIS
host PRINT/QUEUE='&&b' /COPIES=&&ask_copies DIFFUSION_PASSDOWN.LIS
When the quotes all work out, VMS complains about not knowing what decode( means. Thus I know that the decode statment is not being evaluated.
As a side note. How does one print out variable in SQL to debug code. Talk about frustration.
--
--
/\ /\ . /\____ _-_ / \ _/\ / \ /\ / \ /\ / \ / \ / \ /\/ \ / \_/\_/ Y \ /\/\/ \ u \/ \___/ \/ \ / \/ \ ----------------------------------v-------------------------------- Richard Christensen KC7JPQAustin, TX
![]() |
![]() |