Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 03 FEB 1999 07:57:27PM Paul Simonsen wrote:

Hello!

I have also come up with a TCL error during a List statement. The List statement in question is quite long (574 characters), but I don't think that is the problem. The error message I receive is:

"No R/List program was generated. An invalid expression or column has been detected in Line 287."

This message appears when I am increasing the number of items in the Limit part of the List statement. It works fine with 6 or 7 items being limited to, but when I try it with 10 items, I get this message. It appears to arise just before AREV prints the List statement on the screen.

Any help would be appreciated,

-Paul

psimonsen@srpcs.com

SRP Computer Solutions


At 03 FEB 1999 08:04PM Matt Sorrell wrote:

Paul,

One thing you could try is breaking your statement up into several different statements. Use one or two "pre-selects" to narrow down you result set, and then finally the last statement that actually lists the output.

Or, if you wanted to look at the code that is being generated, you can place an (SX) paramter after your statment. This will generate the code, but not run it. It is placed in a file out at DOS in your default directory with a filename of 'RLIST'. Then, you can look at the line number causing the problem and narrow down what exactly is going on.

Matt Sorrell

msorrell@movgal.com


At 04 FEB 1999 07:45PM Paul Simonsen wrote:

Matt,

Thanks for the (SX) suggestion. That did help us find the exact line

that is creating the problem. But now this leads me to another

problem and another question.

What I found out is that one of the lines in the code gets corrupted

and therefore unable to complete its operation. I've copied a portion

of it for reference below:

<code>
*
* DO PRINT LIMITING
*IF ( I.STYLEULNUMBER EQ "431424-JD" OR I.STYLEULNUMBER EQ "431425-JD" OR I.STYLEU "MD2,$"Q "431431-JD" OR I.STYLEULNUMBER EQ "S-#121-C-FL" OR I.STYLEULNUMBER EQ "S-#121-B-FL" ) THEN
GOTO ENDLIMIT
END

</code>

For whatever reason I.STYLEULNUMBER EQ was converted to I.STYLEU "MD2,$"Q and therefore caused this to fail. I've separated the select and sort portions of the statement from the list commands and I've removed everything but the limit portion of the statement and the problem still persists. So it seems that there is a limit to the number of limited items that can be referenced.

Can anyone confirm this or think of a work around? We can fix the above code but these aren't permanent reports. So we need something that will allows the users to continue to create ad hoc reports and yet specify multiple LIMITs if necessary.

Thanks,

psimonsen@srpcs.com

SRP Computer Solutions


At 05 FEB 1999 06:21AM Peter Lynch wrote:

You could use a symbolic field to achieve what you want with no limit (well - 64K Byte) on your LIMIT statement.

 Where you would state this in your list statement -
    LIMIT STYLEULNUMBER=431424-JD" "431425-JD" "431 etc.
 with this
    LIMIT STYLENUMBER=STYLENUMBER.RESTRICTIONS
 The element "STYLENUMBER.RESTRICTIONS" is a symbolic multi-valued field which presents the list of restricting STYLEULNUMBERS.

I do not know enough of your application to give a definitive solution, but as an example here is how you could implement this -

1. Modify the process which gets the list of STYLEULNUMBERS to

write this list to, say, the LISTS file with a LISTS key of, say,

@USERNAME:'.STYLENUMBER.RESTRICTIONS'.

2. Insert in the dictionary field STYLEULNUMBER.RESTRICTIONS the

following code - (or your favourite variations and optimizations)-

  @ANS=XLATE('LISTS', @USERNAME:'.STYLEULNUMBER.RESTRICTIONS', '', 'X')

At 12 FEB 1999 07:35PM Kevin Gray wrote:

Your IF ststement may better be handled using CASE

Change I.whatever to a smaller variable e.g. ANS1

Create variables for pre-defined criteria

e.g. val1=1234567-77"

val1=1234567-78"

BEGIN CASE

CASE ANS1 EQ VAL1

DO SOMETHING

CASE ANS1 EQ VAL2

DO SOMETHING ELSE

CASE ANS1 NE VAL2

DO THE REST

END CASE

In this manner you break your code into managable bits.

You can also deal with much smaller strings of data

and create internal sub-routines or external CALLs to

achieve your desired outcomes.

Hope this helps.

Regards

Kevin Gray

GRAYCORP

email keving@graycorp.com.au


At 12 FEB 1999 07:38PM Kevin Gray wrote:

Second variable VAL1 should have been changed to VAL2

- forgot to edit my cut and paste!!

We are all human after all

Regards,

Kevin


At 13 FEB 1999 02:10PM Warren wrote:

]]We are all human after all«

I'll let the Gnu and Emu answer for themselves on this one…


At 24 FEB 1999 09:14PM garygnu@compuserve.com wrote:

I'm sure I speak for Eric when I say, we resent this unwarrented display of speciesism.

garygnu@compuserve.com

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/4528faf58cf9a66a8525670e00054286.txt
  • Last modified: 2024/01/04 21:00
  • by 127.0.0.1