Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Fully Qualified Field Names in EXCEL Output

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Fully Qualified Field Names in EXCEL Output
 Login/Join
 
Member
posted
I am working in WebFOCUS Developer Studio 8.1.

I have created a report in Excel 2007 format.

The report is based on data as follows:

Table Name: PERSON

Column Names: FIRST_NAME
LAST_NAME

My report shows column headings as follows:

FIRST_NAME LAST_NAME

I would like them to appear as follows:

PERSON.FIRST_NAME PERSON_LAST_NAME

I can I do this?

Thank you.

Paul.

This message has been edited. Last edited by: <Kathryn Henning>,
 
Posts: 10 | Registered: September 04, 2012Report This Post
Expert
posted Hide Post
There does not appear to be a way to force fully qualified field names in report output. There is a SET command that provides a qualified field name, but only if two or more fields with the same name are retrieved from different segments.

quote:

QUALTITLES - The QUALTITLES parameter uses qualified column titles in report output when duplicate field names exist in a Master File. A qualified column title distinguishes between identical field names by including the segment name.

The syntax is:

SET QUALTITLES = {ON|OFF}

where:

ON - Uses qualified column titles when duplicate field names exist and FIELDNAME is set to NEW.

OFF - Disables qualified column titles. OFF is the default value.


I have a feeling your only choice is to hard-code the field names:

...
PRINT 
COUNTRY AS 'CAR.COUNTRY'
...


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Member
posted Hide Post
Francis:

Thank you for your response.

You have confirmed what my research revealed!

Paul.
 
Posts: 10 | Registered: September 04, 2012Report This Post
Gold member
posted Hide Post
Folks, I wanted to post an outline for a “real” (as opposed to ‘I just gave up’) solution to this issue, in the hope that the next person that has this needs finds these thoughts useful (or more likely, someone on the forum has a more efficient method to offer up).
Caveats:
1. this simple approach requires a single fieldname per line, but should be able to be easily extended;
2. this example also only shows a –TYPE of the new focexec code for demonstration. For actual use, change to –WRITE for your appropriate operating system.

Step One: original procedure-

TABLE FILE Car
PRINT           
MODEL           
BY              
COUNTRY         
END   


Step Two: grab the qualified field names for your master. REMINDER: if this is using a JOIN structure, be sure to issue the JOIN PRIOR to issuing the CHECK command.
CHECK FILE CAR HOLD                                       
TABLE FILE HOLD                                           
PRINT FIELDNAME                                           
COMPUTE                                                   
SNAME/A60=SQUEEZ(60, (SEGNAME||'.'||FIELDNAME), 'A60');   
ON TABLE SET HOLDLIST PRINTONLY                           
ON TABLE HOLD FORMAT ALPHA AS FULLYQ                      
END



Without the HOLD command, the following output is produced:

COUNTRY     ORIGIN.COUNTRY
CAR         COMP.CAR  
MODEL       CARREC.MODEL
BODYTYPE    BODY.BODYTYPE


… and so on.

Step Three: run the following code to –READ the original procedure and TYPE out (or –WRITE out, in the real world) a MODIFIED procedure with fully qualified column names.

DYNAM ALLOC DDNAME FEXIN DSNAME X3HK.PDS.FOCEXEC(NONQ) SHR REUSE
-*                                                              
-TOPPER                                                         
-READ FEXIN, &LINE.A80.                                         
-IF &IORETURN NE 0 THEN GOTO BYBY ;                             
-SET &TEST = DECODE &LINE (FULLYQ ELSE 1);                      
-IF &TEST EQ 1 THEN GOTO NOT_OBJECT;                            
-SET &NEWLINE = DECODE &LINE (FULLYQ ELSE 0);                   
-TYPE &LINE AS &NEWLINE
-GOTO TOPPER                                                    
-NOT_OBJECT                                                     
-TYPE &LINE                                                     
-GOTO TOPPER                                                    
-*                                                                
-BYBY                                                           
-EXIT




Running the above procedure against the original code (in step three, be sure to change the DYNAM to the appropriate FILEDEF or APP FI for your shop) generates the following output:


TABLE FILE CAR     
PRINT              
MODEL              
 AS CARREC.MODEL   
BY                 
COUNTRY            
 AS ORIGIN.COUNTRY 
END




Again, my goal here is just to help out the next person, who doesn’t want to go through this process one column at a time for a lot of different procedures. Yes, this is a lot of work if you just have one focexec with just a few fields; however, I hope that if you have MANY focexecs and MANY columns, that the above will serve as a useful starting point.

Of course, there is always the possibility that IBI will create this feature as an NFR:

SET TITLE=FULLQ UAL

would be my suggestion.


WebFOCUS 8
Windows, All Outputs
 
Posts: 71 | Registered: May 29, 2015Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Fully Qualified Field Names in EXCEL Output

Copyright © 1996-2020 Information Builders