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.
Does anyone have a solution for getting a column name on the FOR column? I have a user that's requesting this. I can add a free text line, but he doesn't like that.
thanks, --wg
WF 8009m, Clustered vm Windows2008r2 reporting servers; Web interface: tomcat; Output: EXCEL, HTML, PDF; dbms: Oracle 10, db2 on mvs, mssql
Posts: 81 | Location: Monroe LA | Registered: January 07, 2005
Thanks Francis. You would think this would act like other columns (default to name of FOR column and respond to AS 'some other name'. But, maybe FML is so different, that it's hard (expensive) to implement the same behavior.
Open a request! I do not know how.
Moving on, --wg
WF 8009m, Clustered vm Windows2008r2 reporting servers; Web interface: tomcat; Output: EXCEL, HTML, PDF; dbms: Oracle 10, db2 on mvs, mssql
Posts: 81 | Location: Monroe LA | Registered: January 07, 2005
Are you wanting your user to be able to access the master file within something like report assistant or the like? If so then just hold your output in EDATEMP and then issue a copy command to place the data portion of the output in the directory of your choice -
TABLE FILE CAR
SUM RCOST
DCOST
BY CAR
BY MODEL
FOR COUNTRY
'ENGLAND' OVER
'FRANCE' OVER
'W GERMANY'
ON TABLE HOLD AS MYFMLHOLD
ON TABLE SET HOLDLIST ALL
END
! COPY MYFMLHOLD.FTM [your destination directory]
The hold file will have the FOR column data there, it just doesn't have the fieldname populated. Just make sure that your MYFTMHOLD.mas exists in a directory within the APP PATH.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Does anyone have a solution for getting a column name on the FOR column? I have a user that's requesting this. I can add a free text line, but he doesn't like that.
Well, if [Web]FOCUS cannot help there you might find support from your operating system.
Building on top of Tony's example, I worked this code in my Unix environment which after holding the FML output, modifies the resulting masterfile setting the empty FIELDNAME value as "COUNTRY".
TABLE FILE CAR
SUM RCOST
DCOST
BY CAR
BY MODEL
FOR COUNTRY
'ENGLAND' OVER
'FRANCE' OVER
'W GERMANY'
ON TABLE HOLD AS MYFMLHOLD
ON TABLE SET HOLDLIST ALL
END
-RUN
-*
-* Fix HOLD file assigning a name to the FOR field
-SET &FOR_FLD = 'COUNTRY';
-UNIX sed -e "s/FIELD.*= *,/FIELDNAME =&FOR_FLD, /g" myfmlhold.mas > myfmlhold_new.mas
-UNIX mv -f myfmlhold_new.mas myfmlhold.mas
-*
TABLE FILE MYFMLHOLD
PRINT *
END
-RUN
The key factor there is the Unix "sed" command but any other pattern-like utility (such as perl, awk, ...) can also help. If your environment is not Unix it should be possible to find any scripting language that can help you; for instance, ActivePerl could be a choice in a Windows environment.
Of course, you might attempt to do it the FOCUS way; that is, looping through the created masterfile using -READ, parsing each line to fix the missing FIELDNAME (probably using a combination of POSIT, GETTOK, SUBSTR, ...) and finally using -WRITE to create a "fixed" version of your masterfile. I just found the Unix workaround much simpler although not platform independent
Anyway, hope you can find a better solution to this.
APP HOLD FOCALPOINT
SET HOLDLIST=ALL
SET ASNAMES=ON
TABLE FILE CAR
SUM RCOST
DCOST
BY CAR
BY MODEL
FOR COUNTRY
'ENGLAND' OVER
'FRANCE' OVER
'W GERMANY'
ON TABLE HOLD AS MYFMLHOLD
END
-RUN
TABLEF FILE MYFMLHOLD
PRINT E01 E02 E03 AS COUNTRY E04 E05
ON TABLE HOLD AS MYFULLFML
END
As for the "funny format" this has existed since the the last quarter of the XXth century. I wonder what will happen when it gets fixed...
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006