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 read on the forum and tried many variations of dates for the MFD of my flat file but with no success. A portion of the flat file and the mas is below. Any help would be appreciated.
With 2 date columns, the following fail: USAGE=MDYY, ACTUAL=A10 USAGE=YYMD, ACTUAL=A10 USAGE=MDYY, ACTUAL=DATE USAGE=YYMD, ACTUAL=DATE Adding s or H to the Usage fails also.
If I go with just the first column and a single date column, this will display correctly. With 2 date columns, this fails. As a test, I exported the exact same date column twice and it fails where it does not fail with a single date column only. I actually have 8 date columns so this is a problem. The goal is a date field only although 1 other date field in the full file must display a date also.
error: (for each line in the report) (FOC209) THE DATA VALUE EXCEEDS ITS LENGTH SPECIFICATION: (FOC1346) : FORMAT ERROR: Record 1 , Column 20 (FOC1130) FORMAT CONVERSION ERROR FIELD/KEY : DTEA02 (FOC1346) : FORMAT ERROR: Record 1 , Column 0 (FOC1346) : FORMAT ERROR: Record 1 , Column 12 (FOC1130) FORMAT CONVERSION ERROR FIELD/KEY : PRJNMBR (FOC1130) FORMAT CONVERSION ERROR FIELD/KEY : DTEA01 (FOC1346) : FORMAT ERROR: Record 2 , Column 20 (FOC1130) FORMAT CONVERSION ERROR FIELD/KEY : DTEA02
Thank you, GeriThis message has been edited. Last edited by: Geri,
you don't have date fields, you have alpha fields, 'A18'.
Create them in the MFD as ALPAH and if you want to use them as dates and not just for display add a define to the master using the correct alpha to date functions.
If you want to use SUFFIX=FIX in your master file description, the data must line-up in straight columns. You also need to account for every character in the flat file, including the time columns and spaces between the columns of data. Notice below that I describe TIME01 with a USAGE of A08 but an ACTUAL of A09. The A09 accounts for the spaces on either side of the TIME01 column.
The mas file did not paste well into this page but the columns are straight up and down and all begin at the left side of the beginning of each column. They end differently. The next column again begins straight up and down. They are dates in the flat file. However, they are not full 8/10 charater dates. Feb 2 shows as 2/2/2010 rather than 02/02/2010.
Because these are dates without a consistent length, when creating the file as a text file, it causes the data to go to columns inconsistently. I prefer to read the files as dates for that reason if possible.
I am pasting below as it displays on the flat file and each column begins the same. Let's see how it pastes here. 19065 7/14/2010 0:00:00 11/7/2008 0:00:00 9219 12/31/2010 0:00:00 12/31/2010 0:00:00 201222 7/29/2009 0:00:00 7/29/2009 0:00:00 201206 12/11/2008 0:00:00 12/11/2008 0:00:00 18504 9/30/2010 0:00:00 9/30/2010 0:00:00 18811 7/23/2010 0:00:00 4/28/2009 0:00:00
This like shows the error below USAGE=MDYY, ACTUAL=A10, $
(FOC209) THE DATA VALUE EXCEEDS ITS LENGTH SPECIFICATION: (FOC1346) : FORMAT ERROR: Record 1 , Column 22 (FOC1346) : FORMAT ERROR: Record 1 , Column 42 (FOC1346) : FORMAT ERROR: Record 1 , Column 62
Normally, this file will have 3500 lines and 50 columns. For that reason, I cannot do the write to the create the txt file. We will send this file to the server and read the results of the file on a regular basis.
Thank you, Geri
Posts: 102 | Location: Cincinnati, Oh USA area | Registered: November 02, 2006
Geri, I think you are not going to be able to. You will have to define both the usage and actual formats as alpha. You can add DEFINE fields to the master to parse the input date fields and make them into Smart Dates.
Geri, just wanted to let you know that these -WRITE statements are only for demonstration purposes - it's the quickest way for someone to create an example fex that can be run on almost anybody's WF environment. You wouldn't have to -WRITE the file, nor the Master.
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Here is one solution that would give you what you need. I had to edit the HTML source of this page to get your underlying data format so hopefully I have the correct format.
The first part of the code builds a master file in memory but you could easily build a permanent master file. It has a few defined fields within it to get the timestamps from the data, but it does work.
The second part just loads your exact data in to give me some sample data to test upon.