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     [WORKAROUND] WHERE statement truncated at 80 characters

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[WORKAROUND] WHERE statement truncated at 80 characters
 Login/Join
 
Gold member
posted
I wrote an initial WebFocus report in 7.6.6 and it ran fine with the Where statement...

WHERE ( COMPANY EQ '&COMPANY.(FIND COMPANY,COMPANY IN IRSUM).Company.' ) AND ( WAREHOUSE EQ '&WAREHOUSE.(FIND WAREHOUSE IN IRSUM).Warehouse.' );

...but after I save and close it and then reopen it, it won't run (I get an error) and the Where statement has been truncated to 80 characters...

WHERE ( COMPANY EQ '&COMPANY.(FIND COMPANY,COMPANY IN IRSUM).Company.' ) AND ( W

I tried searching on "where statement trucated" but found nothing. Anyone know what I'm doing wrong?

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


________________________________________________________________________________________
WebFOCUS 7.6.8 + Windows Server 2003 + DB2/400
 
Posts: 66 | Location: Nashville, TN, USA | Registered: January 16, 2008Report This Post
Guru
posted Hide Post
What error do you get ?


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
 
Posts: 398 | Registered: February 04, 2008Report This Post
Virtuoso
posted Hide Post
Split the code into two lines

WHERE ( COMPANY EQ '&COMPANY.(FIND COMPANY IN IRSUM).Company.' ) ;
WHERE ( WAREHOUSE EQ '&WAREHOUSE.(FIND WAREHOUSE IN IRSUM).Warehouse.' );


and see what happens.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Gold member
posted Hide Post
RSquared,
Thanks for your reply. The error was unimportant and not realted since it was a result of the truncatin of the Where statment which made the next statement invalid (ON TABLE SET...).

FrankDutch,
Thanks for your reply. That worked (separate Where statements). However, I abbreviated my initial Where statement example for this post. The actual original Where statement is...

WHERE ( COMPANY EQ '&COMPANY.(FIND COMPANY,COMPANY IN IRSUM).Company.' ) AND ( WAREHOUSE EQ '&WAREHOUSE.(FIND WAREHOUSE IN IRSUM).Warehouse.' ) AND ( LOGO EQ '&LOGO.(FIND LOGO IN IRUPC).Logo.' ) AND ( DATE GE '&FROMDATE.From Date.' ) AND ( DATE LE '&THRUDATE.Thru Date.' ) AND (( BOSBEGPRS NE 0 ) OR ( BOSRCPPRS NE 0 ) OR ( BOSHPPRS NE 0 ) OR ( BOSADJPRS NE 0 ) OR ( BOSRTNPRS NE 0 ) OR ( BOSENDPRS NE 0 ));

...so now my dilemma is how to get that last "AND" statement in there since there is no way it will fit in 80 characters and if I split it on two lines it won't work logically (since I would assume the multiple Where statements are "ANDed" together).


________________________________________________________________________________________
WebFOCUS 7.6.8 + Windows Server 2003 + DB2/400
 
Posts: 66 | Location: Nashville, TN, USA | Registered: January 16, 2008Report This Post
Virtuoso
posted Hide Post
This should fit on one line I think.

WHERE (( BOSBEGPRS NE 0 ) OR ( BOSRCPPRS NE 0 ) OR ( BOSHPPRS NE 0 ) OR ( BOSADJPRS NE 0 ) OR ( BOSRTNPRS NE 0 ) OR ( BOSENDPRS NE 0 ));


Else you can make a DEFINE field that meets this restrictions and use that as a single WHERE.

DEFINE FILE XXX
SPECIAL/A1= IF (( BOSBEGPRS NE 0 ) OR 
( BOSRCPPRS NE 0 ) OR 
( BOSHPPRS NE 0 ) OR 
( BOSADJPRS NE 0 ) OR 
( BOSRTNPRS NE 0 ) OR 
( BOSENDPRS NE 0 )) THEN 'N' ELSE 'Y';
END

....

WHERE SPECIAL EQ 'N';
....




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Expert
posted Hide Post
quote:
WHERE ( COMPANY EQ '&COMPANY.(FIND COMPANY,COMPANY IN IRSUM).Company.' ) AND ( WAREHOUSE EQ '&WAREHOUSE.(FIND WAREHOUSE IN IRSUM).Warehouse.' ) AND ( LOGO EQ '&LOGO.(FIND LOGO IN IRUPC).Logo.' ) AND ( DATE GE '&FROMDATE.From Date.' ) AND ( DATE LE '&THRUDATE.Thru Date.' ) AND (( BOSBEGPRS NE 0 ) OR ( BOSRCPPRS NE 0 ) OR ( BOSHPPRS NE 0 ) OR ( BOSADJPRS NE 0 ) OR ( BOSRTNPRS NE 0 ) OR ( BOSENDPRS NE 0 ));

I assume you're using Dev Studio Report Painter to create your WHERE statement. I suggest splitting each of the statements in the WHERE to individual WHERE statements:

WHERE COMPANY EQ '&COMPANY.(FIND COMPANY,COMPANY IN IRSUM).Company.';
WHERE WAREHOUSE EQ '&WAREHOUSE.(FIND WAREHOUSE IN IRSUM).Warehouse.';
WHERE LOGO EQ '&LOGO.(FIND LOGO IN IRUPC).Logo.';
WHERE DATE GE '&FROMDATE.From Date.' AND DATE LE '&THRUDATE.Thru Date.';
WHERE BOSBEGPRS NE 0 OR BOSRCPPRS NE 0 OR BOSHPPRS NE 0 OR BOSADJPRS NE 0 OR BOSRTNPRS NE 0 OR BOSENDPRS NE 0;

Each of the WHERE statements will be available in the Where section of the Report Options dialog box, including the last one - it does not get truncated in my 7.6.5 Dev Studio Report Painter.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Gold member
posted Hide Post
quote:
Each of the WHERE statements will be available in the Where section of the Report Options dialog box, including the last one - it does not get truncated in my 7.6.5 Dev Studio Report Painter.

I am using Report Painter in Dev Studio (7.6.6) and it is truncating exactly at 80 characters so that last line is too long. Is this truncation normal behavior of the software?


________________________________________________________________________________________
WebFOCUS 7.6.8 + Windows Server 2003 + DB2/400
 
Posts: 66 | Location: Nashville, TN, USA | Registered: January 16, 2008Report This Post
Guru
posted Hide Post
The 80 character limit is an historical thing. It should not be truncating at 80 characters.

I tried to reproduce this behaviour in R766 and couldn't. If you open a case, upload the original fex and master file I will take a look at it, just let me know what the case number is.


ttfn, kp


Access to most releases from R52x, on multiple platforms.
 
Posts: 346 | Location: Melbourne Australia | Registered: April 15, 2003Report This Post
Master
posted Hide Post
I would really look at breaking it up because if you use the resource layout and in 1 of the parameters you select all the whole where statement will be ignored. FOC_NONE throws away the whole statment that makes up any single command.




Scott

 
Posts: 865 | Registered: May 24, 2004Report This Post
Expert
posted Hide Post
quote:
AND (( BOSBEGPRS NE 0 ) OR ( BOSRCPPRS NE 0 ) OR ( BOSHPPRS NE 0 ) OR ( BOSADJPRS NE 0 ) OR ( BOSRTNPRS NE 0 ) OR ( BOSENDPRS NE 0 ));
and get rid of extraneous white space!

You could also write the above as -

AND (BOSBEGPRS NE 0 OR BOSRCPPRS NE 0 OR BOSHPPRS NE 0 OR BOSADJPRS NE 0 OR BOSRTNPRS NE 0 OR BOSENDPRS NE 0);

I would recommend you to take up Karen's generous offer. Raise a case and let her know the number!!

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Gold member
posted Hide Post
Tony A - that where statement (with the white space and parenthesis) came from the Report Painter.

I opened a case on it and sent the case number to Piipster.

Thanks everyone for the replies.

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


________________________________________________________________________________________
WebFOCUS 7.6.8 + Windows Server 2003 + DB2/400
 
Posts: 66 | Location: Nashville, TN, USA | Registered: January 16, 2008Report This Post
Master
posted Hide Post
Can any of the numbers be negative? If not, change your where to:
WHERE BOSBEGPRS + BOSRCPPRS + BOSHPPRS + BOSADJPRS + BOSRTNPRS + BOSENDPRS NE 0;


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report This Post
Gold member
posted Hide Post
Yes the numbers can be negative but the real issue is that these are inventory numbers (receipts, shipments, adjustments and returns) so each has to be tested individually since we want to show the record if there are items there or there was inventory movement.


________________________________________________________________________________________
WebFOCUS 7.6.8 + Windows Server 2003 + DB2/400
 
Posts: 66 | Location: Nashville, TN, USA | Registered: January 16, 2008Report This Post
Expert
posted Hide Post
I've faced this situation before. And it sounds more like the fact that you're on a mainframe and your procedures (focexecs) are being stored in a PDS with a fixed LRECL of 80. Check it out. If so, just limit your code to LE 80 characters.




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Gold member
posted Hide Post
Without knowing the entire 'logic tree' it seems that you might break up the WHERE statements into logical groups ?

I believe that WF causes ANDed conditions to become FALSE when the first FALSE condition is encountered, so prioritize them with the most-likely-to-be-false first in the list ?

FrankDutch's suggestion to use DEFINEs might also help make all those conditons more manageable in the process of making each condition shorter.


WF 7.6.4 & 5.3
Charles Lee
 
Posts: 93 | Registered: June 17, 2008Report This Post
Gold member
posted Hide Post
Doug - good call because I found out earlier this morning that it was any statement since I just added a drill down to an fex needing seven parameters and it chopped it off too. It's not limited to only WHERE statements.

Is there any way to check that PDS and record length?


________________________________________________________________________________________
WebFOCUS 7.6.8 + Windows Server 2003 + DB2/400
 
Posts: 66 | Location: Nashville, TN, USA | Registered: January 16, 2008Report This Post
Gold member
posted Hide Post
Well before anyone could figure it out at tech support, I created a new application (folder) and moved all of my focexecs, master and access files over to the new folder and they are working correctly now. the original folder was built at install time and was 7.6.4 or earlier and evidently had the problem. Since we are a new customer and this is the first report, this new application (folder) solves our problem.

Thanks to all that replied!


________________________________________________________________________________________
WebFOCUS 7.6.8 + Windows Server 2003 + DB2/400
 
Posts: 66 | Location: Nashville, TN, USA | Registered: January 16, 2008Report This Post
Expert
posted Hide Post
Start by asking your systems people for that information. I have found that the datasets on the mainframe for focexecs and MFDs are, predominantly, Fixed 80, while the datasets for HTML is variable length.

I really wouldn't call this a 'workaround' as it is 'working as designed'.




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
<JG>
posted
As of 5.2 focexec line lengths over 80 characters are supported

quote:
The following are the recommended DCB attributes for a wide FOCEXEC PDS:

Record Format (RECFM) VB.

Logical Record Length (LRECL) up to 4096.

System defined DASD default block size
 
Report This Post
Gold member
posted Hide Post
quote:
Originally posted by Doug:
Start by asking your systems people for that information. I have found that the datasets on the mainframe for focexecs and MFDs are, predominantly, Fixed 80, while the datasets for HTML is variable length.

I really wouldn't call this a 'workaround' as it is 'working as designed'.

Well I didn't want to call it "solved" so I picked "workaround". Since I was able to create a new application and copy my FOCEXECS there and they were no longer being truncated - I'd say that was a work around and that there is still some kind of problem with the original application that was created and/or brought in here during the installation by the IBI installer.

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


________________________________________________________________________________________
WebFOCUS 7.6.8 + Windows Server 2003 + DB2/400
 
Posts: 66 | Location: Nashville, TN, USA | Registered: January 16, 2008Report This Post
<JG>
posted
quote:
that was created in 7.6.4 by the IBI installer

Do not disagree with that.

There is no reason why the focexec PDS should have been created as anything other
that shown above, unless it is a site requirement.

That is so obsolete, it verges on being prehistoric in computing terms.
 
Report This Post
Gold member
posted Hide Post
I guess I'm not at all familiar with the term "focexec PDS". Where is it and how can I check it. As mentioned previously, I did not make any changes other than to simply create a new application and copy my focexecs and master/acx files over and that one works.


________________________________________________________________________________________
WebFOCUS 7.6.8 + Windows Server 2003 + DB2/400
 
Posts: 66 | Location: Nashville, TN, USA | Registered: January 16, 2008Report This Post
<JG>
posted
quote:
Windows Server 2003

I think we (I) may have been guilty of misguiding you here.

Your WebFocus Server is on Windows 2003?

If that is the case PDS is totally of no interest as it relates only to mainframe.

Windows does not have a fixed length file issue and it sounds like you have just been unlucky.
 
Report 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     [WORKAROUND] WHERE statement truncated at 80 characters

Copyright © 1996-2020 Information Builders