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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Recordlimit
 Login/Join
 
Member
posted
Hi,
We have csv file which is created every monday by batch jobs using FOCUS and is ftped to server for users to analyse. Most of the weeks we have rows less than 65000(approx limit supported by microsoft excel). But sometimes it goes above this max limit and users are not able to get the complete data in excel. I rerun the FOCUS program and create two output files(one for 3 days and other for 2 days, instead of one file for full week). To solve this I tried using RECORDLIMIT but it supports LE and EQ only.
My Aim is -

IF RECORDLIMIT LE 65000
.......
ON TABLE HOLD AS FILE1 FORMAT LOTUS

and

IF RECORDLIMIT GT 65000
.......
ON TABLE HOLD AS FILE2 FORMAT LOTUS

But FOCUS 7.1.1 does not allow second syntax.

Any idea how to solve this?

Thanks,
Gaurav.
 
Posts: 15 | Location: Third Rock from Sun | Registered: August 04, 2005Report This Post
Expert
posted Hide Post
I think you would have to DEFINE a field that is a counter, and then filter on that field...

DEFINE FILE HOLD01
COUNTER/P8 = COUNTER = COUNTER + 1;
END

TABLE FILE HOLD01
PRINT
...
WHERE COUNTER LE 65000
ON TABLE HOLD AS ...
END

TABLE FILE HOLD01
PRINT
...
WHERE COUNTER GT 65000
WHERE COUNTER LE 130000
ON TABLE HOLD AS ...
END
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
I take it the issue is the 7.1.1 version.

Have you tried FORMAT CSV, it creates a comma delimited file as well.
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Virtuoso
posted Hide Post
Just ignore me, it might help if I read the 'whole' thing.

The define counter option suggested should work.
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Expert
posted Hide Post
gp, RECORDLIMIT is only really meaningful as
IF RECORDLIMIT EQ ....
Recordlimit isn't a variable, so you cant test on it the way you can test other vars. so the define counter suggestion actually creates a variable that you can test on..which is just what you want here.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Member
posted Hide Post
Hi all,
Thanks for your quick replies. But it seems I am missing something. My code is,

DEFINE FILE HOLD1 ADD
COUNTER/P8 WITH CUS=COUNTER=COUNTER+1;
END

TABLE FILE HOLD1
IF COUNTER LE 65000
PRINT
COUNTER
....
ON TABLE HOLD AS REPORT1 FORMAT LOTUS
END
TABLE FILE HOLD1
IF COUNTER GT 65000
PRINT
COUNTER
....
ON TABLE HOLD AS REPORT2 FORMAT LOTUS
END

All the rows are getting written in first file only because counter is always 0. Why is not getting incremented? Am I doing anything wrong?

GP.
 
Posts: 15 | Location: Third Rock from Sun | Registered: August 04, 2005Report This Post
Platinum Member
posted Hide Post
Try:
DEFINE FILE HOLD1 ADD
COUNTER/P8 WITH CUS=LAST COUNTER+1;
END
 
Posts: 115 | Location: Chicago, IL | Registered: May 28, 2004Report This Post
Member
posted Hide Post
Yup - adding last did the magic. Smiler
Thanks for all your help !!!
 
Posts: 15 | Location: Third Rock from Sun | Registered: August 04, 2005Report This Post
Platinum Member
posted Hide Post
Hi GP,

Here's an example that creates one or more hold files depending on how many records are in the original file and how many records you want in each hold file. In this example I'm extracting 275 records from "BIGFILE" and creating hold files of 100 records each. The result will be three files:
file01.prn - 100 records
file02.prn - 100 records
file03.prn - 75 records

DEFINE FILE BIGFILE
CNTR/I7 = CNTR + 1;
REC_CNT/I5 = IF REC_CNT LT 100 THEN REC_CNT + 1 ELSE 1;
FIL_CNT/I2 = IF REC_CNT EQ 1 THEN FIL_CNT + 1 ELSE FIL_CNT;
END
TABLE FILE BIGFILE
PRINT FIL_CNT REC_CNT CNTR FIELD1 FIELD2
WHERE RECORDLIMIT EQ 275
ON TABLE HOLD AS HOLD_BF
END
-*
DEFINE FILE HOLD_BF
FIL/D2L = FIL_CNT;
CNT/I5 = 1;
END
TABLE FILE HOLD_BF
SUM CNT
BY FIL
ON TABLE SAVE AS LOOPCTRL
END
-RUN
-*
-SET &V_FIL = ' ';
-SET &V_CNT = ' ';
-LOOPER
-READ LOOPCTRL NOCLOSE &V_FIL &V_CNT
-IF &IORETURN NE 0 GOTO EOF;
-SET &OUTFILE = 'FILE' || &V_FIL;
-*
TABLE FILE HOLD_BF
PRINT FIL_CNT REC_CNT CNTR FIELD1 FIELD2
WHERE FIL_CNT EQ &V_FIL
ON TABLE HOLD AS &OUTFILE FORMAT LOTUS
END
-RUN
-GOTO LOOPER
-EOF
-CLOSE LOOPCTRL

I don't know if you have any interest in this, but if so, give it a try.

Jim
 
Posts: 118 | Location: Lincoln Nebraska | Registered: May 04, 2005Report This Post
Master
posted Hide Post
WebFOCUS 5.3 New Feature Excel Worksheets.

Excel Compound Reports

The compound report has been extended to support Excel. WebFOCUS can now generate
Excel reports that contain multiple worksheets in a single workbook. This new feature is
based on the existing PDF compound report model and offers three different scenarios.

� Multiple reports can be merged into a single Excel workbook with each report residing
in its own uniquely named worksheet.

� Multiple reports can be merged into a single Excel workbook with all reports flowing
continually in a single named worksheet.

� A single report can be burst into multiple worksheets within a single workbook based
on a sort value in the report.

I would generate a seperate worksheet for some by field (burst) as noted in bullet # 3
 
Posts: 865 | Registered: May 24, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders