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  iWay Software Product Forum on Focal Point    Get Record Count From plain/txt file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Get Record Count From plain/txt file
 Login/Join
 
Member
posted
Using the Execution Object: File Object to read in a text file.

Is there a way to determine how many records (rows) that the file read in has?

Use Case: If a bad validation file is created and it only contains a header, then No Email with attached document is needed. So if the file has more records other then the header record, then send the Email.

Has anyone figured out a way to do this?


iWay Service Manager (6.0.1 )
 
Posts: 8 | Registered: November 17, 2010Report This Post
Gold member
posted Hide Post
Hi,
Certainly the File Listener creates an SREG called msgsize, not sure if the file object does the same. It may be worth putting an XDQAAgent object directly after the file read, and seeing if any other SREGs appear.

Regards,
Ade.


iWay 5.5 SMSP1 and 6.0.1 on Intel/Linux
 
Posts: 59 | Location: Birmingham, Blighty | Registered: October 30, 2007Report This Post
Member
posted Hide Post
After you read the file with the file read agent, it becomes a document. Try _length(_trim(_flatOf())) and compare it to the expected header size.


iWay Service Manager (6.0.1 - patch.62627)
DMC Version 7 Release 7
 
Posts: 12 | Registered: January 24, 2011Report This Post
Member
posted Hide Post
I am going with the _length(_trim(_flatOf())) solution because low overhead of adding just a user properties and checking that value.

I appreciate both of you taking the time to provide a solution.


iWay Service Manager (6.0.1 )
 
Posts: 8 | Registered: November 17, 2010Report This Post
Member
posted Hide Post
I used _length(_trim(_flatOf())) because I found it working for the problem I had.It was a perfect solution to my problem.
 
Posts: 1 | Location: # SE 17th St Ocala, FL | Registered: September 20, 2011Report This Post
Member
posted Hide Post
Hi,

I guess you know the length of header section(consider it as 500).

COND(_LENGTH(_FLATOF()),GT,500).

Use the above in a decision check object and send the mail on the case of true or false accordingly.


iWay ISM 5.5/iWay ISM 6.0 on Windows.
 
Posts: 20 | Registered: April 11, 2011Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    Get Record Count From plain/txt file

Copyright © 1996-2020 Information Builders