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'm using mainframe FOCUS, version 7.6.13. We have a flat file that has a header record with a date in it, detail records associated to the header record, then a detail record. But there is data in this file from 2001 - 2015. So a header record for each year, detail records, then a trailer record ending the group. Here is a data sample:
in my query I'm saying WHERE PDT EQ '200111' it does return the detail records for that year but it's also returning the detail for future years. I'm thinking my MFD is wrong but don't know what is wrong with it.This message has been edited. Last edited by: <Kathryn Henning>,
Can u please expand on why u think RECTYPE might work ? After reviewing this I think the problem might be that there is nothing that is associating the Header record with the detail records, such as a 'H' code for the header and a 'D' code for the detail.
So it appears there is no single field (column-position, or block of contiguous columns) common to all records, that effectively identifies the record as Header, Detail (perhaps several types), or Trailer - which could serve the RECTYPE role.
If you can provide a rule for identifying the type of each line, then it becomes possible to transform the file, by prepending an explicit RECTYPE code to each line, into a layout on which you can define a master with RECTYPE declarations for processing the sequence of records.
(It would be nice if a DEFINE could serve as the RECTYPE ... can a business view include RECTYPE structure? ... just thinking aloud)
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
I have used RECTYPE with an accept range. The file had Low-values , High-values header/control records but the data record had no type field so I set up the accept for all letters and numbers. You will have to workout the accept values for each Record Type. Remember the column tested does not have to be in the same position on each record. Focus will use the frist match found.
Jim Morrow Web Focus 7.6.10 under Windows 2003 MVS 7.3.3
It is also possible to parse such data by using some of the many character functions available in FOCUS/WebFOCUS. You can create a "read" master file description with a single field whose length is the width of the flat file, then use DEFINEs to parse the data into distinct columns. This is especially useful when 2 or more "tests" are needed to determine a particular record type.
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007
Originally posted by Jim Morrow: ...Remember the column tested does not have to be in the same position on each record. Focus will use the first match found.
@jim
That's useful. Is it explicitly documented?
(undocumented behaviors sometimes get dropped without prior notice in a later release)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Added: I looked it up:
Describing a RECTYPE Field
When a data source contains multiple record types, there must be a field in the records themselves that can be used to differentiate between the record types. ... This field must appear in the same physical location of each record. For example, columns 79 and 80 can contain a different two-digit code for each unique record type. Describe this identifying field with the field name RECTYPE. . . . http://documentation.informati...ddlang/wfddlang.pdf, p 243. emphasis added
So, if RECTYPE as currently implemented supports non-uniform placement (and uses "first match wins" logic) as you describe, IBI is not committed to supporting that behavior in future releases.This message has been edited. Last edited by: j.gross,
- Jack Gross WF through 8.1.05
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005