George,
Variable "DTOTAMT" previously
> undefined.  Empty string used.

Was DTOTALS assigned?
Was DADVTOT assigned?

If not, you are possibly attempting to assign one variable to another that
has not yet been assigned.
Here's a viable solution...
IF NOT(ASSIGNED(DTOTALS)) THEN DTOTALS = 0
IF NOT(ASSIGNED(DADVTOT)) THEN DADVTOT = 0

Lee Bacall
http://www.binarystar.com
Phone: +1 (954) 791-8575
Cell:      +1 (954) 655-6581

----- Original Message ----- 
From: "George Gallen" <[EMAIL PROTECTED]>
To: "Ardent List" <[EMAIL PROTECTED]>
Sent: Monday, December 20, 2004 5:19 PM
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