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

Re: Displaying items??



It looks like we are all in agreement that in the snippet of code provided
by Rick, no error should have occurred. My question to Rick is are you still
getting an error on the display statements?

Thx,
Victor Loghin
VGL Consulting Inc.


----Original Message Follows----
From: Manoj Gurjar <mgurjar@HOTMAIL.COM>
Subject: Re: Displaying items?? - Victor
Date: Wed, 27 Oct 1999 17:43:21 EDT

Victor,

I never got error. I thought it might give error and
tested and worked w/o giving error.

I think original Messege was something like this :
including

"display &ibt.business_unit
I get an error on the display statement."


>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?



>From: Victor Loghin <vgl_ca@HOTMAIL.COM>
>Reply-To: SQR-USERS@list.iex.net
>To: Multiple recipients of list SQR-USERS <SQR-USERS@list.iex.net>
>Subject: Re: Displaying items?? - Victor
>Date: Wed, 27 Oct 1999 14:18:10 EDT
>
>Manoj,
>
>I never got an error, you did.
>
>Thx,
>Victor Loghin
>VGL Consulting Inc.
>
>----Original Message Follows----
>From: Manoj Gurjar <mgurjar@HOTMAIL.COM>
>Subject: Re: Displaying items?? - Victor
>Date: Wed, 27 Oct 1999 13:14:31 EDT
>
>Oops, it works. Didn't give error even if no row selected.
>
>Victor, here we have PS7.5, SQR4.3.x, Informix 7.3.
>
>Send me exact piece of code, where u are getting error, and
>let me see.
>
>Regards,
>Manoj
>
>
>>From: Victor Loghin <vgl_ca@HOTMAIL.COM>
>>Reply-To: SQR-USERS@list.iex.net
>>To: Multiple recipients of list SQR-USERS <SQR-USERS@list.iex.net>
>>Subject: Re: Displaying items?? - Victor
>>Date: Wed, 27 Oct 1999 12:04:59 EDT
>>
>>Manoj,
>>
>>You state:
>>"it will give error. It is quite obvious"
>>
>>Well, this does not happen to me in the DB2/MVS environment. That is why I
>>want to know your platform and the actual error message you are getting.
>>
>>We can reference the variable before the select executes and also after it
>>executes and returns no rows and do not get an error. The column variable
>>cobntains null.
>>
>>Thx,
>>Victor Loghin
>>VGL Consulting Inc.
>>
>>----Original Message Follows----
>>From: Manoj Gurjar <mgurjar@HOTMAIL.COM>
>>Subject: Re: Displaying items?? - Victor
>>Date: Wed, 27 Oct 1999 11:20:02 EDT
>>
>>>Victor wrote:
>>
>>>The select does not return any rows. When we use the column variable it
>>>is
>>>null. We do not get an error. What error do you get?
>>
>>So if select does not return any row and if u reference
>>that memory variable (&Field from select) outside of
>>begin-select, it will give error. It is quite obvious.
>>
>>If no row selected then that memory variable is not defined
>>at all and will give error if u reference it in Display statement.
>>
>>And Display works fine within Begin-select, as if no
>>row selected then Display statement won't execute.
>>
>>HTH,
>>Manoj
>>
>>>From: Victor Loghin <vgl_ca@HOTMAIL.COM>
>>>Reply-To: SQR-USERS@list.iex.net
>>>To: Multiple recipients of list SQR-USERS <SQR-USERS@list.iex.net>
>>>Subject: Re: Displaying items?? - Manoj
>>>Date: Wed, 27 Oct 1999 08:58:45 EDT
>>>
>>>Manoj,
>>>
>>>The select does not return any rows. When we use the column variable it
>>>is
>>>null. We do not get an error. What error do you get?
>>>
>>>Victor Loghin
>>>VGL Consulting Inc.
>>>
>>>
>>>----Original Message Follows----
>>>From: Manoj Gurjar <mgurjar@HOTMAIL.COM>
>>>Subject: Re: Displaying items?? - Victor
>>>Date: Tue, 26 Oct 1999 15:38:17 EDT
>>>
>>>Victor,
>>>
>>>We have SQR 4.3.2, Informix 7.3.
>>>
>>>But this issue is not related to specific release.
>>>It will work with any SQR and database.
>>>
>>>If u are getting NULL, then if u have access to backend
>>>using some kind of SQL editor (like we use SQL*Plus with
>>>Oracle), then do simple select for that field from the
>>>table and see if u really have any value in that column.
>>>
>>>So basically :
>>>
>>>Begin-Select
>>>Field1
>>>
>>>  display &Field1
>>>
>>>FROM TABLE1
>>>where <criteria>
>>>
>>>End-Select
>>>
>>>This Display will give o/p in log file if any rows are
>>>selected from the table, based on your selection criteria
>>>for the Field1 values.
>>>
>>>Hope this helps,
>>>Manoj
>>>
>>>>From: Victor Loghin <vgl_ca@HOTMAIL.COM>
>>>>Reply-To: SQR-USERS@list.iex.net
>>>>To: Multiple recipients of list SQR-USERS <SQR-USERS@list.iex.net>
>>>>Subject: Re: Displaying items??
>>>>Date: Tue, 26 Oct 1999 14:14:12 EDT
>>>>
>>>>Manoj,
>>>>
>>>>What version of SQR, platform and database are you using? With both SQR
>>>>3
>>>>and 4.1.73 on MVS and DB2, I get the null value.
>>>>
>>>>Victor Loghin
>>>>VGL Consulting Inc.
>>>>
>>>>----Original Message Follows----
>>>>From: Manoj Gurjar <mgurjar@HOTMAIL.COM>
>>>>Subject: Re: Displaying items??
>>>>Date: Tue, 26 Oct 1999 13:47:27 EDT
>>>>
>>>>>Rick,
>>>>>
>>>>>What you have should work fine; indentation OUTSIDE a select
>>>>>doesn't matter.  The following works fine for me:
>>>>
>>>>This will give error for display outside of begin-select
>>>>in NO row selected.
>>>>
>>>>So better to put display within Begin-select.
>>>>
>>>>>
>>>>>    begin-program
>>>>>
>>>>>    begin-select
>>>>>    dummy &a
>>>>>
>>>>>       display &a
>>>>>
>>>>>    from dual
>>>>>    end-select
>>>>>
>>>>>    display &a
>>>>>
>>>>>    end-program
>>>>>
>>>>>What error are you getting?   What version of SQR are you using?
>>>>>Does "show" work instead of "display"?
>>>>>
>>>>>Ray
>>>>>
>>>>> > 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?
>>>>> >
>>>>>
>>>>>----------------------------------------------------------------------
>>>>>Ray Ontko   rayo@ontko.com   Phone 1.765.935.4283   Fax 1.765.962.9788
>>>>>Ray Ontko & Co.   Software Consulting Services   http://www.ontko.com/
>>>>
>>>>______________________________________________________
>>>>Get Your Private, Free Email at http://www.hotmail.com
>>>>
>>>>______________________________________________________
>>>>Get Your Private, Free Email at http://www.hotmail.com
>>>>
>>>
>>>______________________________________________________
>>>Get Your Private, Free Email at http://www.hotmail.com
>>>
>>>______________________________________________________
>>>Get Your Private, Free Email at http://www.hotmail.com
>>
>>______________________________________________________
>>Get Your Private, Free Email at http://www.hotmail.com
>>
>>______________________________________________________
>>Get Your Private, Free Email at http://www.hotmail.com
>
>______________________________________________________
>Get Your Private, Free Email at http://www.hotmail.com
>
>______________________________________________________
>Get Your Private, Free Email at http://www.hotmail.com

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

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