Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Maintain Error: Datatypes not supported for comparison operation.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Maintain Error: Datatypes not supported for comparison operation.
 Login/Join
 
Gold member
posted
I have the following code in an event handler that keeps producing the error "Datatypes not supported for computational/comparison operation."

 IF SEC1 NE '' THEN BEGIN
	OrderStk(1).CRS_SECTION = SEC1;
	OrderStk(1).QTY = QTY1;ENDBEGIN 


SEC1 is defined as A0. I'm just checking to see if there is any data in SEC1, and if so to assign it to a field in a stack. I'm not sure why this isn't allowed.

I know this is the code that is causing the error, because if I remove that code the error goes away.

Any one know why maintain is not allowing this simple comparison?

This message has been edited. Last edited by: brjohnson,


Bryan Johnson
WebFOCUS 7.7.03
Maintain
Win 7
Excel, PDF, HTML
 
Posts: 54 | Registered: January 16, 2008Report This Post
Expert
posted Hide Post
Bryan, the code seems OK, but what are the formats of the stack fields and the QTY1 field.

What sort of event handler is it? I assume it is set the run Maintain code not JS etc.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6349 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
Bryan,

Tested your code, and it ran without any problem.
But, as Waz already mentioned, we don't know what the formats of the various fields are.
And this may even be caused by something that is also in this event handler, so maybe post your entire handler code?


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Gold member
posted Hide Post
The entire event handler code is:
 Case OnbtnNext_Click
Compute TheDate = today2();
COMPUTE C/I8= 1;
REPEAT SelectedBooksNCourses.FOCCOUNT; SelectedBooksNCourses.FOCINDEX = 1;
COMPUTE I = 1;
	REPEAT WHILE I LE SecCount;
		COMPUTE OrderStk(C).ISBN = SelectedBooksNCourses(SelectedBooksNCourses.FOCINDEX).ISBN;
		COMPUTE OrderStk(C).TITLE = SelectedBooksNCourses(SelectedBooksNCourses.FOCINDEX).BOOK_TITLE;
		COMPUTE OrderStk(C).INSFNAME = FirstName;
		COMPUTE OrderStk(C).INSLNAME = LastName;
		COMPUTE OrderStk(C).TERM = SelectedBooksNCourses(SelectedBooksNCourses.FOCINDEX).TERM;
		COMPUTE OrderStk(C).CRS_NAME = SelectedBooksNCourses(SelectedBooksNCourses.FOCINDEX).CRS_NAME;
		COMPUTE OrderStk(C).ADDDATE = TheDate;
		COMPUTE C = C + 1;
		ENDREPEAT I = I + 1;
ENDREPEAT SelectedBooksNCourses.FOCINDEX = SelectedBooksNCourses.FOCINDEX + 1;



IF SEC1 NE '' THEN BEGIN
	OrderStk(1).CRS_SECTION = SEC1;
	OrderStk(1).QTY = QTY1;ENDBEGIN


COMPUTE NEXT_FORM = 'Test';
		self.WinClose();
EndCase 

The code isn't completely finished, but I wanted to get this part working before I added anything to it. It is maintain code not JS.

OrderStk.CRS_SECTION is defined as A50v
OrderStk.QTY is defined as I11
SEC1 is defined as A0
QTY is defined as I11


Bryan Johnson
WebFOCUS 7.7.03
Maintain
Win 7
Excel, PDF, HTML
 
Posts: 54 | Registered: January 16, 2008Report This Post
Master
posted Hide Post
I have a couple of questions:

1) In your example you say that QTY is an I11, but in the code you have QTY1. Is this just a typo?
2) What is the format of TheDate and OrderStk(C).ADDDATE ?
3) What is the format of SecCount?

I THOUGHT that maybe the problem was equating a A50V with an A0, but that's not causing me any problems. If you want, zip up the MNT files, MAS files and Other files and send them to:
MARK_DERWIN@IBI.COM and I will try to debug here.

Mark
 
Posts: 663 | Location: New York | Registered: May 08, 2003Report This Post
Gold member
posted Hide Post
quote:
1) In your example you say that QTY is an I11, but in the code you have QTY1. Is this just a typo?
2) What is the format of TheDate and OrderStk(C).ADDDATE ?
3) What is the format of SecCount?


1) Just a typo. QTY1 is defined as I11.
2) TheDate / A10 OrderStk.ADDDATE / HYYMDs
3) SecCount / I8.

This message has been edited. Last edited by: brjohnson,


Bryan Johnson
WebFOCUS 7.7.03
Maintain
Win 7
Excel, PDF, HTML
 
Posts: 54 | Registered: January 16, 2008Report This Post
Master
posted Hide Post
I'm going to assume you meant OrderStk.ADDDATE / HYYMDs and not HYMMDs. I still don't see the problem. If I had to guess I would assume it's the AnV format field.

I will be happy to debug here. Just zip up the files and send them to me at Mark_Derwin@ibi.com.

Mark
 
Posts: 663 | Location: New York | Registered: May 08, 2003Report This Post
Gold member
posted Hide Post
Well by moving the code from behind the event handler to a function on the mnt I was able to workaround this error.

I don't know why this error was occurring, but since I've gotten around it...moving on.


Bryan Johnson
WebFOCUS 7.7.03
Maintain
Win 7
Excel, PDF, HTML
 
Posts: 54 | Registered: January 16, 2008Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Maintain Error: Datatypes not supported for comparison operation.

Copyright © 1996-2020 Information Builders