Check to see if there is a way to get to 
TOTAMT<TT+OFFSET>=TOTAMT<TT+OFFSET>+IVAL

But by pass 
TOTAMT=""

Unless we can see the full section of code that deal with it can not specify
what is the cause but what causing the error.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of George Gallen
Sent: Monday, December 20, 2004 2:20 PM
To: Ardent List
Subject: [U2] getting undefined errors when varible look defined (UV/unix)

Here is a snippit of code:

            ITOT="" ; TOTAMT="" ; DTOT="" ; DTOTAMT=""
*
            ITOT=ADVTOT(JPOS3,T)
        TOTAMT=TOTALS(JPOS3,T)
        DTOT=DADVTOT(JPOS3,T)
        DTOTAMT=DTOTALS(JPOS3,T)
*
            ITOT<TT+OFFSET>=ITOT<TT+OFFSET>+IVAL
        TOTAMT<TT+OFFSET>=TOTAMT<TT+OFFSET>+IVAL
            DTOT<TT+OFFSET,TQ>=DTOT<TT+OFFSET,TQ>+IVAL
        DTOTAMT<TT+OFFSET,TQ>=DTOTAMT<TT+OFFSET,TQ>+IVAL
*
        ADVTOT(JPOS3,T)=ITOT
        TOTALS(JPOS3,T)=TOTAMT
        DADVTOT(JPOS3,T)=DTOT
        DTOTALS(JPOS3,T)=DTOTAMT

when the full program is run I get these:

Program "SPG-JSPEND-1": Line 762, Variable "DTOTAMT" previously
undefined.  Empty string used.
Program "SPG-JSPEND-1": Line 759, Variable "ITOT" previously undefined.
Empty string used.
Program "SPG-JSPEND-1": Line 759, Variable "ITOT" previously undefined.
Empty string used.
Program "SPG-JSPEND-1": Line 760, Variable "TOTAMT" previously
undefined.  Empty string used.
Program "SPG-JSPEND-1": Line 760, Variable "TOTAMT" previously
undefined.  Empty string used.
Program "SPG-JSPEND-1": Line 761, Variable "DTOT" previously undefined.
Empty string used.

I'm assuming that nothing is ever been assigned to (JPOS3,T) to cause
the error.
I trIed using:

            IF ADVTOT(JPOS3,T)#"" THEN ITOT=ADVTOT(JPOS3,T)

So I then put in a PRINT ADVTOT(JPOS3,T) and on certain number combos I
get:

Program "SPG-JSPEND-1": Line 755, Variable "$R196" previously undefined.
Empty string used

What is $R196?

JPOS3 and T were both within the dimension of this array, otherwise I
would have received an
   Array out of bounds error.

How can I test for this so I don't get a screen full of the above?

George



George Gallen
Senior Programmer/Analyst
Accounting/Data Division
[EMAIL PROTECTED]
ph:856.848.1000 Ext 220

SLACK Incorporated - An innovative information, education and management
company
http://www.slackinc.com
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to