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

Re: SQR procedures




I agree wholeheartedly.  The duplicate entry column name problem (e.g.
&EMPLID) is solved by passing params. It is a more 'mature' (modular) way
to code. Also it is possible to use the same routine more than once without
pesky name collisions.




 (Embedded
 image moved   Jean-Luc Peyret <Jean-Luc_Peyret @ PEOPLESOFT.COM>
 to file:      03/12/98 12:50 AM
 PIC03028.PCX)




Please respond to SQR-USERS@USA.NET

To:   Multiple recipients of list SQR-USERS <SQR-USERS @ list.iex.net>
cc:    (bcc: Steve Hall)
Subject:  Re: SQR procedures




Hi
I haven't had any problems with local variables.  By that I mean passing
parameters to procedures rather than using global variables
Ex:  do my_proc ($var1, #var2, :#var3)   !all variables in my_proc are now
local and :#var3 can be changed and returned (':' before it)
Regarding strange error messages, SQR has its own way to let you know it's
unhappy and it sometimes gets confusing (line numbers in a heavily
#included program for example).  It didn't get any worse with parameterized
procs.
All in all, I much prefer using parameterized procedures and I found little
to complain about with them (aside from the fact that you have to remember
to add a '_' when you do want to refer to global variables).  One big  gain
is that the &select columns do not cause duplicate entries.  Another is
that your program is much more robust and easier to read because procedures
can't interfere with global variables.
JLuc




 (Embedded
 image moved   Scott Self <Scott.Self @ ASTRAMERCK.COM>
 to file:      03/12/98 04:52 PM
 PIC19554.PCX)



Please respond to SQR-USERS@USA.NET
To:   Multiple recipients of list SQR-USERS <SQR-USERS @ list.iex.net>
cc:    (bcc: Jean-Luc Peyret)
Subject:  SQR procedures



We are beginning to use SQR v3 in UNIX, connecting to an Oracle database.
We would like to use the local variable and procedure
functionality with SQR but I have heard rumors that SQR is not incredibly
robust when it comes to defining local and global
procedures and variables.  I've been told that SQR can return strange
errors that are difficult to track down because the error
message seems to be unrelated to the cause.  I wanted to know if anyone out
there has had similar experiences or if the rumors
I'm hearing are just that, rumors.
Thanks,
Scott Self


PIC19554.PCX

PIC03028.PCX