RE: [U2] Universe triggers + SB+$ OPTIONS PICK

2008-11-26 Thread Manu Fernandes
Hi,

Yes, SB+ work with DIM arrays.
The difference between PICK/PI DIM arrays is the ability to redimension an 
array at runtime (PICK arrays are DIMed at compile time).

Dimensioned arrays are allocated either at compile time or at run time, 
depending on the flavor of the account (or compile $OPTIONS FLAVOR directive). 
Arrays allocated at run time are called standard arrays. 
Arrays allocated at compile time are called fixed arrays. 
Standard arrays are redimensionable; 
Fixed arrays are not redimensionable and do not have a zero element. 
All arrays are standard unless the program is compiled in a PICK, IN2, or 
REALITY flavor account, in which case they are fixed arrays. 
To use fixed arrays in PIOPEN, INFORMATION and IDEAL flavor accounts, use the 
STATIC.DIM option of the $OPTIONS statement. 
To use standard arrays in PICK, IN2, and REALITY flavor accounts, use $OPTIONS 
bSTATIC.DIM

Both vectors **var(n)** and matrices **var(n,n)** have a special zero element 
that is used in MATPARSE statement, MATREAD statements, and MATWRITE 
statements. 
The zero element of a vector is specified by vector.name(0), and the zero 
element of a matrix is specified by matrix.name(0,0). 
Zero elements are used to store fields that do not fit in the dimensioned 
elements on MATREAD or MATPARSE statements.

My two pence.
Manu


> -Message d'origine-
> DeB : [EMAIL PROTECTED] [mailto:owner-u2-
> [EMAIL PROTECTED] De la part de Anthony Youngman
> EnvoyC)B : mercredi 26 novembre 2008 15:48
> CB : u2-users@listserver.u2ug.org
> ObjetB : RE: [U2] Universe triggers + SB+$ OPTIONS PICK
> 
> Does the common contain dimensioned arrays? Quite likely, I would have
> thought.
> 
> And that would be why you need OPTIONS PICK. Ideal-flavour UV uses PI-
> style arrays which have an element (0). Pick-style arrays don't. I
> think there may also be something to do with how many entries in the
> common table are taken up by an array.
> 
> Cheers,
> Wol
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:owner-u2-
> [EMAIL PROTECTED] On Behalf Of Manu Fernandes
> Sent: 26 November 2008 12:47
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] Universe triggers + SB+$ OPTIONS PICK
> 
> Hi,
> 
> About $OPTIONS PICK,
> 
> Yes it is important  - to fix, we put it into the DMSKELCODE COMMON
> record ; on the first line - before COMMON statement.
> SB+ is PICK flavor compiled .
> On certain site, we have SB+ running under INFORMATION flavor account
> (backward compatibility of old application mixed with SB+ UI.
> To be in ad equation with SB+, the new basic code must be (force)
> compiled under PICK FLAVOR.
> 
> Manu
> 
> > -Message d'origine-
> > De : [EMAIL PROTECTED] [mailto:owner-u2-
> > [EMAIL PROTECTED] De la part de Susan Joslyn
> > Envoyi : mercredi 26 novembre 2008 11:26
> > @ : u2-users@listserver.u2ug.org
> > Objet : RE: [U2] Universe triggers + SB+
> >
> > Manu,
> > You are a life-saver!  Thank you!  I didn't know about $OPTIONS PICK
> > and
> > that truly solves the problem!
> ---
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
> ---
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Universe triggers + SB+$ OPTIONS PICK

2008-11-26 Thread Anthony Youngman
Does the common contain dimensioned arrays? Quite likely, I would have thought.

And that would be why you need OPTIONS PICK. Ideal-flavour UV uses PI-style 
arrays which have an element (0). Pick-style arrays don't. I think there may 
also be something to do with how many entries in the common table are taken up 
by an array.

Cheers,
Wol

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Manu Fernandes
Sent: 26 November 2008 12:47
To: u2-users@listserver.u2ug.org
Subject: RE: [U2] Universe triggers + SB+$ OPTIONS PICK

Hi,

About $OPTIONS PICK,

Yes it is important  - to fix, we put it into the DMSKELCODE COMMON record ; on 
the first line - before COMMON statement.
SB+ is PICK flavor compiled .
On certain site, we have SB+ running under INFORMATION flavor account (backward 
compatibility of old application mixed with SB+ UI.
To be in ad equation with SB+, the new basic code must be (force) compiled 
under PICK FLAVOR.

Manu

> -Message d'origine-
> De : [EMAIL PROTECTED] [mailto:owner-u2-
> [EMAIL PROTECTED] De la part de Susan Joslyn
> Envoyi : mercredi 26 novembre 2008 11:26
> @ : u2-users@listserver.u2ug.org
> Objet : RE: [U2] Universe triggers + SB+
>
> Manu,
> You are a life-saver!  Thank you!  I didn't know about $OPTIONS PICK
> and
> that truly solves the problem!
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Universe triggers + SB+$ OPTIONS PICK

2008-11-26 Thread Manu Fernandes
Hi,

About $OPTIONS PICK,
 
Yes it is important  - to fix, we put it into the DMSKELCODE COMMON record ; on 
the first line - before COMMON statement.
SB+ is PICK flavor compiled . 
On certain site, we have SB+ running under INFORMATION flavor account (backward 
compatibility of old application mixed with SB+ UI.
To be in ad equation with SB+, the new basic code must be (force) compiled 
under PICK FLAVOR.

Manu

> -Message d'origine-
> De : [EMAIL PROTECTED] [mailto:owner-u2-
> [EMAIL PROTECTED] De la part de Susan Joslyn
> Envoyi : mercredi 26 novembre 2008 11:26
> @ : u2-users@listserver.u2ug.org
> Objet : RE: [U2] Universe triggers + SB+
> 
> Manu,
> You are a life-saver!  Thank you!  I didn't know about $OPTIONS PICK
> and
> that truly solves the problem!
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Universe triggers + SB+

2008-11-26 Thread Manu Fernandes
Hi,

Yes, a trigger starts a automatic "BEGIN TRANSACTION" !!
With SB+, this is a trouble I suffer too, I've already submited to IBM to 
request a ISOMODE enforcement of SB+ internals subroutines.  
The IBM's doc says **we recommend that you modify any transactions that do not 
follow this rule as soon as possible** ; but "The shoemaker is always the worst 
shod."

Yes, there is a uvconfig param to change it : ISOMODE ( UV docs, Basic ref - 
Isolation levels - ISOMODE )
If set to 0, you don't need to acquire the READU lock before WRITE/DELETE !! 
(be carefull with it))

Manu


Using the ISOMODE Configurable Parameter
The ISOMODE parameter controls the minimum locking requirements for each 
UniVerse system. 
By enforcing a minimum level of locking, the transaction management subsystem 
guarantees 
that no transaction suffers a lost update due to the actions of another 
transaction. 
Protection against lost updates is an important property of serializability. 
You can set ISOMODE to one of the following settings:
ISOMODE Settings
Setting
Description
0  Provides backward compatibility. Transactions are not required to use 
well-formed writes.
1  Enforces well-formed writes in UniVerse BASIC transactions. This is the 
default.
2  Enforces well-formed writes in UniVerse BASIC programs, whether or not they 
are in a transaction.

The default ISOMODE setting 1 ensures that BASIC transactions obey the locking 
rules for isolation level 1, as described in the following table. 
This means a record cannot be written or deleted in a transaction unless the 
record or file is locked for update. 
A write or delete of a locked record is known as a well-formed write.
ISOMODE setting 0 provides compatibility with earlier UniVerse releases that 
did not enforce the requirement for well-formed writes in transactions. 
Since transactions should always use well-formed writes, 
we recommend that you modify any transactions that do not follow this rule as 
soon as possible, so that you can set ISOMODE to 1.
Setting ISOMODE to 2 enforces all writes and deletes in UniVerse BASIC to be 
well-formed. 
This mode is available so that when converting an application to use 
transactions, you can determine whether any programs have not yet been 
converted. 
You should not use ISOMODE 2 permanently since many UniVerse system programs 
are not (and need not be) transactional. 

> -Message d'origine-
> De : [EMAIL PROTECTED] [mailto:owner-u2-
> [EMAIL PROTECTED] De la part de Susan Joslyn
> Envoyi : mercredi 26 novembre 2008 11:26
> @ : u2-users@listserver.u2ug.org
> Objet : RE: [U2] Universe triggers + SB+
> 
> Manu,
> You are a life-saver!  Thank you!  I didn't know about $OPTIONS PICK
> and
> that truly solves the problem!
> 
> Which took me to the next problem.  The trigger program appears to be
> much
> more rigorous about record locks.  That's fine for code that I can get
> to,
> but it announces that I don't have the record locked for stuff that's
> happening inside SB+ that I can't get to.  Is there a way loosen up
> these
> constrictions?
> 
> 
> Program "UV.ED": pc = 73EC, Program "SB.GEN.DRIV.I": Line 793, FATAL:
> The
> locks
> necessary for database operations at the current isolation level (0)
> are not
> held by this process.
> 
> Susan
> 
> 
> Date: Tue, 25 Nov 2008 19:43:20 +0100
> From: "Manu Fernandes" <[EMAIL PROTECTED]>
> Subject:
> Hi,
> 
> Do you use the $OPTIONS PICK into the basic code before INCLUDE
> DMSKELCODE
> COMMON ?
> 
> My two pence.
> Manu
> 
> 
> > -Message d'origine-
> > De : [EMAIL PROTECTED] [mailto:owner-u2-
> > [EMAIL PROTECTED] De la part de Susan Joslyn
> > Envoyi : mardi 25 novembre 2008 18:10
> > @ : u2-users@listserver.u2ug.org
> > Objet : [U2] Universe triggers + SB+
> >
> > Has anyone successfully enabled Universe trigger programs that call
> SB+
> > enabled programs?  I'm getting COMMON mis-match and other errors.
> >
> >
> >
> > TIA,
> >
> > Susan Joslyn
> > ---
> ---
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Universe triggers + SB+

2008-11-26 Thread Susan Joslyn
Manu,
You are a life-saver!  Thank you!  I didn't know about $OPTIONS PICK and
that truly solves the problem!

Which took me to the next problem.  The trigger program appears to be much
more rigorous about record locks.  That's fine for code that I can get to,
but it announces that I don't have the record locked for stuff that's
happening inside SB+ that I can't get to.  Is there a way loosen up these
constrictions?


Program "UV.ED": pc = 73EC, Program "SB.GEN.DRIV.I": Line 793, FATAL: The
locks 
necessary for database operations at the current isolation level (0) are not
held by this process.

Susan


Date: Tue, 25 Nov 2008 19:43:20 +0100
From: "Manu Fernandes" <[EMAIL PROTECTED]>
Subject: 
Hi,

Do you use the $OPTIONS PICK into the basic code before INCLUDE DMSKELCODE
COMMON ?

My two pence.
Manu


> -Message d'origine-
> De : [EMAIL PROTECTED] [mailto:owner-u2-
> [EMAIL PROTECTED] De la part de Susan Joslyn
> Envoyi : mardi 25 novembre 2008 18:10
> @ : u2-users@listserver.u2ug.org
> Objet : [U2] Universe triggers + SB+
> 
> Has anyone successfully enabled Universe trigger programs that call SB+
> enabled programs?  I'm getting COMMON mis-match and other errors.
> 
> 
> 
> TIA,
> 
> Susan Joslyn
> ---
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/


RE: [U2] Universe triggers + SB+

2008-11-25 Thread Manu Fernandes
Hi,

Do you use the $OPTIONS PICK into the basic code before INCLUDE DMSKELCODE 
COMMON ?

My two pence.
Manu


> -Message d'origine-
> De : [EMAIL PROTECTED] [mailto:owner-u2-
> [EMAIL PROTECTED] De la part de Susan Joslyn
> Envoyi : mardi 25 novembre 2008 18:10
> @ : u2-users@listserver.u2ug.org
> Objet : [U2] Universe triggers + SB+
> 
> Has anyone successfully enabled Universe trigger programs that call SB+
> enabled programs?  I'm getting COMMON mis-match and other errors.
> 
> 
> 
> TIA,
> 
> Susan Joslyn
> ---
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
---
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/