[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Displaying items??



Rick,

The only way I could generate an error in the DB2 MVS environment with your
example was to use the column variable in a local procedure.
It worked when using the column variable before the select, when the select
returns the null set and even when the column is numeric.

In this example you are probably only going to execute this select once, but
if you are going to execute it multiple times with the potential for the
null set being returned, your column variable is not set to null but instead
retains it's prior value.

I noticed an interesting thing when using a numeric column before the select
and also when the select returned the null set. The column variable is null,
yet it can be used in the statement
let #x = &column + 1
and #x displays as 1.000000. Null is treated as zero. Does this make sense?

Victor Loghin
VGL Consulting Inc.



----Original Message Follows----
From: Rick Creel <Rick_Creel@AONCONS.COM>
Subject: Displaying items??
Date: Tue, 26 Oct 1999 08:57:50 -0400

I have a select and display statement similar to the following:

begin-select on-error=sql_error
ibt.business_unit     &ibt.business_unit
ibt.project_id        &ibt.project_id

    do some_procedure

from ps_pc_intfc_bl_tao ibt
where ibt.process_instance = #prcs_process_instance
end-select

display &ibt.business_unit


I get an error on the display statement.
Is there a way to display the  &ibt.business_unit   variable without having
to
move it to a $ type variable?

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com