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     [CLOSED]Count number of records in master file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]Count number of records in master file
 Login/Join
 
Member
posted
Hi guys,
In my project i need to find number of records in master file . &LINES is not effecting the result.

This message has been edited. Last edited by: <Emily McAllister>,


Apps Studio 8.1.0.5
Windows 7
 
Posts: 29 | Registered: March 02, 2016Report This Post
Platinum Member
posted Hide Post
That depands on the structure in your master file. If it is a single hierarchy you need to count one of the fields in the lowest segment.
 
Posts: 140 | Location: Adelaide South Australia | Registered: October 27, 2006Report This Post
Member
posted Hide Post
My master file is single hierarchy only.


Apps Studio 8.1.0.5
Windows 7
 
Posts: 29 | Registered: March 02, 2016Report This Post
Master
posted Hide Post
 TABLE FILE CAR
SUM CNT.STANDARD
END


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Platinum Member
posted Hide Post
Hello Hemin,

What do you need to do with the count? Can you not just

TABLE FILE XX
COUNT FIELDNAME
ON TABLE HOLD
END
-RUN
-READ HOLD &CNTR
...
That should give you the count. Now what do you want to do with that information? If you need to retrieve the count, -READ that number and you can use it in a variable.

Hope that helps.

All these nifty commands in the Keysheet.


Vivian Perlmutter
Aviter, Inc.


WebFOCUS Keysheet Rel. 8.0.2
(Almost) 1001 Ways to Work with Dates thru Rel. 8.0.2
Focus since 1982
WebFOCUS since the beginning
Vivian@aviter.com

 
Posts: 191 | Location: Henderson, Nevada | Registered: April 29, 2003Report This Post
Member
posted Hide Post
Actually i am creating a filter condition that effect master file using fex file. So i just want to know the number of lines of records in master file . Here &LINES and COUNT wont play the role because that commands used in report level.


Apps Studio 8.1.0.5
Windows 7
 
Posts: 29 | Registered: March 02, 2016Report This Post
Virtuoso
posted Hide Post
Are you saying that you want to know the number of lines in a master file?

You can read it with -READ and -REPEAT and count each line, but that's not something you want to do with large quantities of master files...


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Expert
posted Hide Post
ok here's a really primitive way to do it...
but then, I like to code.. I feel better.

FILEDEF MYFILE DISK MYFILE.MAS
-RUN
-WRITE MYFILE FILENAME=MYFILE , SUFFIX=FIX,$
-WRITE MYFILE SEGMENT=MYFILE,SEGTYPE=S0,$
-WRITE MYFILE FIELDNAME=MASTERLINE, ALIAS=E01,USAGE=A70V,ACTUAL=A70V,$
-CLOSE MYFILE
 
-RUN
-SET &kounter = 0 ;
FILEDEF MYFILE DISK  C:\ibi\apps\ibisamp\car.mas
-RUN
 
-:toploop
-READ MYFILE &MYLINE.A70.
-IF &RETCODE NE 0 GOTO :endloop ;
-IF &MYLINE.QUOTEDSTRING LIKE '$%' GOTO :toploop; 
-SET &kounter = &kounter + 1 ;
-TYPE &|kounter: &kounter &|RETCODE:&RETCODE  &MYLINE
-IF &kounter GT 100 GOTO :endloop ;
-GOTO :toploop ;
-:endloop
-TYPE &|kounter: &kounter &|RETCODE:&RETCODE




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Master
posted Hide Post
Maybe see if CHECK FILE will work for you?
CHECK FILE CAR HOLD AS HLDMASTR
-RUN
TABLE FILE HLDMASTR
PRINT *
ON TABLE HOLD AS DUMMY
END
-RUN
-SET &WORK = &LINES;
-TYPE &WORK records held.   
 
Posts: 822 | Registered: April 23, 2003Report This Post
Virtuoso
posted Hide Post
Hemin,
If I understand you correctly you want to know how many lines there are in a MASTER file.
If so try the following:
  
EX -LINES 6 EDAPUT MASTER,MS,C,MEM 
FILENAME=MS, SUFFIX=FIX
SEGNAME=L, SEGTYPE=S0
FIELDNAME=CH, FORMAT=A1, ACTUAL=A1, $
SEGNAME=R, PARENT=L, OCCURS=VARIABLE
FIELDNAME=CHR, FORMAT=A1, ACTUAL=A1,$
-RUN
-DEFAULT &FNAME-CAR
CHECK FILE &FNAME HOLD AS MS
-RUN
TABLE FILE MS
COUNT CH 
END


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report 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     [CLOSED]Count number of records in master file

Copyright © 1996-2020 Information Builders