Author Topic: QRD "Uninitialized Variable Used! Zero Assumed!"  (Read 7443 times)

DonQuixote

  • Rock Star
  • *****
  • Posts: 205
  • To Dream the Impossible Dream...
QRD "Uninitialized Variable Used! Zero Assumed!"
« on: November 30, 2009, 06:22:40 PM »
Are there any known problems in QRD that would result in this warning popping up on the screen? "WARNING: UNINITIALIZED VARIABLE USED! Zero Assumed!"
I am using the ORDER.HISTORY file and entered the sort and print field as INV.NUM.
I'd like to total the TAX.AMT MERCH.AMT INV.AMT but those are not even there, yet.
The error only occurs when I try to send it to 'Excel', which is a must for this report.

DonQuixote

  • Rock Star
  • *****
  • Posts: 205
  • To Dream the Impossible Dream...
Re: QRD "Uninitialized Variable Used! Zero Assumed!"
« Reply #1 on: December 01, 2009, 01:06:38 PM »
According to Prelude, this is a "known IBM issue" and they recommend the work around of writing the report in /RD (report definition).

precisonline

  • President
  • Administrator
  • Rock Star
  • *****
  • Posts: 1612
    • Precision Solutions
Re: QRD "Uninitialized Variable Used! Zero Assumed!"
« Reply #2 on: December 02, 2009, 03:00:16 PM »
Have you tried running it via MM -E to see where the message is occurring?
-Kevin
Accidents "happen"; success, however, is planned and executed.

DonQuixote

  • Rock Star
  • *****
  • Posts: 205
  • To Dream the Impossible Dream...
Re: QRD "Uninitialized Variable Used! Zero Assumed!"
« Reply #3 on: December 02, 2009, 03:56:08 PM »
The result of running      :MM name -E
***DEBUGGER called at line 143 of program /ud/DEV/USER-FORMS/_TU.PC.DOWNLOAD

(143)  DEFN<30> = HEADER<HED.LENGTH>


Knowing this ... is there a way to set HED.LENGTH ahead of time?

precisonline

  • President
  • Administrator
  • Rock Star
  • *****
  • Posts: 1612
    • Precision Solutions
Re: QRD "Uninitialized Variable Used! Zero Assumed!"
« Reply #4 on: December 02, 2009, 03:59:20 PM »
Sure, the source code of TU.PC.DOWNLOAD is in the TUBP file.  It's not the most gorgeous stuff ever, but it's readable enough.  You should be able to work out a solution that way, right?
-Kevin
Accidents "happen"; success, however, is planned and executed.

DonQuixote

  • Rock Star
  • *****
  • Posts: 205
  • To Dream the Impossible Dream...
Re: QRD "Uninitialized Variable Used! Zero Assumed!"
« Reply #5 on: December 02, 2009, 05:02:40 PM »
My thought, besides fighting windmills, was to test for unassigned variable and to give it a value of  "".
I kept a screen copy of the DEBUG line:
(143)  DEFN<30> = HEADER<HED.LENGTH>

When I edited the program, to my surprise it had moved and changed.
(146)  DEFN<30> = HEADER<HED.LNGTH>

When could this had happen? During an upgrade?
I ran the program again ... to see the error still existed.
Then compiled the program.
Ran it again.  And by magic it was gone.
I dare not say more...  except ... thank you.   ::)

precisonline

  • President
  • Administrator
  • Rock Star
  • *****
  • Posts: 1612
    • Precision Solutions
Re: QRD "Uninitialized Variable Used! Zero Assumed!"
« Reply #6 on: December 02, 2009, 05:16:20 PM »
Not all that surprising; that would have been my next recommendation.  This tells me that at some point someone loaded the TUBP for an SBClient upgrade and then didn't compile it.  Pretty rare that such a thing happens, but ... it does happen.
-Kevin
Accidents "happen"; success, however, is planned and executed.