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] HELP with -READ

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] HELP with -READ
 Login/Join
 
Gold member
posted
I'm seeing a error in a report where it seems to be combining two values into the same variable.

It should be reading a file of "BUDG_CODE" that contains:

690
692
694
696
697
780

which is created by this code:
 
TABLE FILE EXHB21A
SUM MAX.BUDGET_UNIT_CODE
BY BUDGET_UNIT_CODE NOPRINT
ON TABLE SAVE AS BUDG_CODE FORMAT ALPHA
END
-RUN
 

However, when it runs, it is displaying an error showing:
 
WHERE BUDGET_UNIT_CODE EQ '690         692         ';
 

when the code calls for:
 
WHERE BUDGET_UNIT_CODE EQ '&BUDGET';
 


which appears to be appending the values in line 1 and 2 of BUDG_CODE.

It is consumed by following code:
 
-* Outer loop for Budget Units.
-REPEAT :End_Report FOR &M FROM 1 TO &BUD_NO;
-READ BUDG_CODE NOCLOSE &BUDGET.A24.

TABLE FILE EXHB21a
SUM
     Col_1
     Col_2
     Col_5
     Col_6
     Col_9
     Col_10
     BUDGET_UNIT_DESC
	 BUDGET_UNIT_CODE
BY  Sort_Ord ROWS '1' OVER '2' OVER '4' OVER '5'
BY COL5_SORT
BY  N_DESC3
WHERE BUDGET_UNIT_CODE EQ '&BUDGET';
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS EXBH21A_1 FORMAT ALPHA
END
-RUN
 


Any ideas?

I thought I'd might mention that I'm modifying a report that runs fine in Production (8001) in our Development (8002) environment.

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


8.0.02M, Oracle 11.2 (AIX), Windows 2008R2, HTML, PDF, Excel
 
Posts: 72 | Registered: November 12, 2012Report This Post
Gold member
posted Hide Post
I have also verified "SET VARCHAR OFF" in my EDASPROF...
 
Posts: 72 | Registered: November 12, 2012Report This Post
Master
posted Hide Post
WHERE BUDGET_UNIT_CODE EQ '690         692         ';
                           123456789012123456789012

Judging by the results you show, BudgetUnitCode is stored in the SAVE file, as an A12, but the recordlayout in your -READ says to read 24 positions.

This message has been edited. Last edited by: David Briars,
 
Posts: 822 | Registered: April 23, 2003Report This Post
Virtuoso
posted Hide Post
You mix the read and the 'in file' functionality.

In this case the where statement should be

WHERE BUDGETUNITCODE IN FILE EXBH21A ;




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
Thanks David - that was what has fixed it. I changed from A24 to A12:

 
-READ BUDG_CODE NOCLOSE &BUDGET.A12.
 


Strange, it didn't seem to be a problem in 8001 code version. I will testing this code change in 8001 and report back.

Thanks all for starting my Friday off good. Smiler
 
Posts: 72 | Registered: November 12, 2012Report This Post
Gold member
posted Hide Post
Testing: I dragged the FEX from my 8002 environment to my 8001 environment in Dev Studio and while it produces a report in 8002, in 8001 it displays an error:

 
(FOC3209) UNKNOWN KEYWORD IN STYLESHEET FILE AT LINE 533
(FOC009) INCOMPLETE REQUEST STATEMENT
 


Lines 530-535 looks like:
  
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
TYPE=REPORT,
     TOPGAP=0.015,


while the raw table data is displayed in one "blob" on the screen...
 
Posts: 72 | Registered: November 12, 2012Report This Post
Gold member
posted Hide Post
Just finished my testing. In 8001 the (sloppy) code is allowed to process as a "24" - however, in 8002 it must be consistent (12).

I might raise this issue with IBI just to make sure this is expected behavior.
 
Posts: 72 | Registered: November 12, 2012Report This Post
Gold member
posted Hide Post
Oh, to get around the other errors (stylesheet), I had to use the Migration tool. Then the same code ran fine. That was strange as well but it could be caused by running 8002 Dev Studio and copying to 8001 environments.
 
Posts: 72 | Registered: November 12, 2012Report This Post
Platinum Member
posted Hide Post
It depends on the situation, I have run into format errors when reading from a table many times.

We eventually found the command '-READFILE' where the formats are taken from the table itself so you don't have to individually format each variable. The only potential issue is '-READFILE' called it's variables whatever you called the fields in the table in sequential order so you have to be careful not to overwrite something.

Basically:

-READFILE HOLD_TEST

Instead of
-READ HOLD_TEST SOME_SOLUMN.A12 OTHER COLUMN.A12 ETC....

We never went back to '-READ'


WebFOCUS App Studio 8.2.02
Windows 7, All Outputs
 
Posts: 141 | Location: Mclean, VA | Registered: December 04, 2012Report This Post
Gold member
posted Hide Post
Thanks Tim. Lots to absorb and test.
 
Posts: 72 | Registered: November 12, 2012Report This Post
Virtuoso
posted Hide Post
Regarding -READFILE

1. A recent client insisted on camelCased names for amper vars. To rename a data column as a mixed-case string (to match the target amper var), as in
RCOST AS 'RetailCost'
,
it is essential to have
SET ASNAMES = MIXED

in effect (whether at the session or TABLE level).

2. I habitually give the HOLD file a ddname matching the target amper var (or one of them). Several human-factors benefits.

3. Don't forget -RUN between the "Table ... Hold" request and the -READFILE

4. Note that -READFILE can be used in a loop to read successive rows of the hold file into the (same) amper vars. (You may want to -CLOSE the file once you are through with it.)


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report 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] HELP with -READ

Copyright © 1996-2020 Information Builders