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.
I am looking for someone to help me out on string searches. I am looking to pull strings out of a log file where I could have multiple key text of 'Quality Code:'. I need to find and extract all the text for each Quality Code. I can find the first one easy enough with a POSIT function but if there are more in the log how do I find them or where they begin.
Here is a same of what is in the log:
[Quality Code entered by Cole, Lisa at 02/06/08 10:42 Quality Code: Incomplete/Inaccurate Detail Comments: TTS/AMC did not have enough Details in Description to know what issue is. They did not know what Webform Team workgroup - informed CSC-Wobform and assigned to them. ---------------------------------------------------------------------------------------------------- Quality Code entered by Rutkowski, David at 02/06/08 09:52 Quality Code: Incorrect Escalation Comments: correction... Informed that this should go to CSC Incident ---------------------------------------------------------------------------------------------------- Quality Code entered by Rutkowski, David at 02/06/08 08:54 Quality Code: Incorrect Escalation Comments: This appears to be mis-directed. It is not a TSS GTS issue. It is a "TSS/AMC Support" issue. ---------------------------------------------------------------------------------------------------- ]
Any ideas would be great.This message has been edited. Last edited by: Kerry,
Given this sample of your log, what would your report look like?
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
Look up the PARAG subroutine. That would allow you to break up the entry into multiple lines.
Another technique which would work better in Dialogue Manager would be to use POSIT and SUBSTR, then cut off the stuff you've already processed, move the unprocessed stuff to column 1 and start your loop again at the beginning.
Is this log record all one line or is it a multiline text file? I have a couple of ideas to add to Ginny's but it would very much depend on the answer to this question.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
OK so I think I figured some things out. Each Quality code that is added is diliminated by 100 dashes. How do I created a for next loop to extract all the text between the 100 dashes.
First of all, you have to update your profile signature with your products, releases, and platforms so that we know what you are running.
Secondly, while I could write the code for you, you wouldn't learn anything. So what I would suggest is that you read the Developing Reporting Application manual, chapter 5 in the 7.6 version of the manual, on Dialogue Manager.
You are not going to be able to do the loop in a DEFINE. You are going to have to do a -READ against the log file and parse the snot out of it.
BTW, have you looked at the PARAG subrountine? Wouldn't that help you at all?
One more thing to look at - it appears that you are trying to create multiple lines of output from a single record. This is the classic case for use of the Macguyver technique. It's a little advanced, but it is described in detail and numerous variations here on the forum and in tech support if you do a search.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
You have a file with a totally unknown record length that you cannot read with WebFocus that you cannot put into DM variables because they will blow all possible limits.
Read the file one character at a time and as Ginny says
quote:
parse the snot out of it.
After all you just need 31 lines of code (and a new master to read the output with WebFocus
I think that should go on a T-shirt for next year's Summit.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007