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 have a flat file that has a short first record (42 char alpha).
The following records are much longer, but each the same length with 32 fixed length columns, no delimeter character.
I master file is working fine as long as I don't have the first record, but the customer will start producing this file with the short first record. How should the master file change?
This is one flat file with 3 record types. The file comes from a COBOL program and all the rows are 200 characters long, however, this concept should still work with variable length records. In my case there is data in the H2FILL, DFILL2 ans S1FILL fields, I just don't need it for the report. In this case, RECTYPE is a single character field at the beginning of each row that identifies the record. 'H' for the header, 'D' for the detail and 'S' for sub-detail, hence the ALIAS names.
In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006
Hi Here is an idea.This is how I would handle it.I have been working with FOCUS since 1988. Get hold of the user written subroutione library and look up ARGLEN. Even though one line may be 42 chars and the others in excess of say 512 chrs, you can flag your header record not to come out, by doing the following 1) Create the first field in you master file in excess of 42 characters long. Say 45. Remember that all your fields are shown as alpha. In the case of your header record, you will be using 42 of the 45. You can use ARGLEN to flag this one as NON KOSHER, with in a define. 2)For your first data field the ARGLEN will be greater that 42 chars so the first field will occupy the first "32 chars" and the remaining 13 of (45) will form the first part of you second field, a second define will concatenate this with the 19 characters of the next field in your master file to create a KOSHER second field. So instead of having fieldname = firstfield1, e01, a32, a32,$ fieldname = firstfield2, e03, a32, a32,$
DEFINE FILE MYFILE HEADER/I9 = ARGLEN(45,FIRSTFIELD1,'I9'); ISHEADER/A1 = IF (HEADER EQ 42) THEN 'Y' ELSE 'N'; PATNO1/A32 = SUBSTRING(45,FIRSTFIELD1, 1,32,32,'A32'); GARNUM/A13= SUBSTRING(45,FIRSTFIELD1, 33,45,13,'A13'); WHOLEGARNUM/A32 = GARNUM || FIRSTFIELD2; END
TABLE FILE MY FILE PRINT PATNO1 WHOLEGARNUM etc WHERE ISHEADER NE 'Y' ON TABLE HOLD AS TEMP1 END -RUN
I hope that this helps. It is so hard to place the exact code here.Please feel free to contact me at njm870t@hotmail.com should you need clarification or more help(e.g creating the master file) .