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     [CLOSED] Blanks for duplicate values in Excel file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Blanks for duplicate values in Excel file
 Login/Join
 
Member
posted
I know that the default for FOCUS is not to repeat values on a report if the previous value for that field is the same.
I am creating an Excel formatted output file and I would like the description to appear in every line in the spreadsheet even if it is the same as the previous line of data.
Can someone tell me how to keep these values in every record in the Excel file or any output file for that matter?
I have searched the forum but apparently I am not putting in the correct search terms to find anything. I know I saw something out here on the forum before about this but cannot find it now.

This message has been edited. Last edited by: tinamshorty,


FOCUS for Mainframe 7.2
Windows and IBM Z9 Mainframe processor
FOCUS, Excel


 
Posts: 21 | Registered: October 31, 2008Report This Post
Virtuoso
posted Hide Post
SET BYDISPLAY=ON


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Expert
posted Hide Post
SET BYDISPLAY = ON


quote:
BYDISPLAY
Within a vertical sort group, the sort field value displays only on the first line of the rows for its sort group. However, you can display the appropriate BY field on every row in a styled report using the SET BYDISPLAY command. Although SET BYDISPLAY is supported for all styled output formats, it is especially important for making report output more usable by Excel, which cannot sort columns properly when they have blank values in some rows.

This feature may enable you to avoid specifying the sort field twice, once as a display field and once for sorting (with the NOPRINT option).

The syntax is:

SET BYDISPLAY = {ON|OFF}
where:

OFF
Displays a BY field value only on the first line of the report output for the sort group. OFF is the default value.

ON
Displays the associated BY field value on every line of report output produced in a styled format.



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
Ah! That's it! Thanks Darin and Frances! I'll try that now!


FOCUS for Mainframe 7.2
Windows and IBM Z9 Mainframe processor
FOCUS, Excel


 
Posts: 21 | Registered: October 31, 2008Report This Post
Member
posted Hide Post
What if it is not a sort field? I am doing a MATCH with two files. From the second file, all I print is the description. It is not a BY field, but when I hold the file, I get blank field values where the description is the same as the previous one.
I tried making it a BY field and that didn't work either. Here is my code.

 -SET &RPTNAME='GL MATCH PROGRAM';              
-SET &TODD=HHMMSS('A8');                       
-DEFAULT &BANK=ALL;                            
-DEFAULT &PRECAP=ALL;                          
-DEFAULT &FILEDATE=10311997;                   
-DEFAULT &OPCODE  ='TST';                      
-TYPE PROCESSING...  &FOCFOCEXEC BANK=&BANK    
-TYPE                &RPTNAME                  
-INCLUDE WHERTEST                              
DEFINE FILE GLHLDFST                           
 LAD/YYMD=&LAD;                                
 EAD/YYMD=&EAD;                                
 A_FST_E_TRAN_AMT/D19.2 = EDIT(FST_E_TRAN_AMT);
   A_FST_E_POST_DATE/YYMD = FST_E_POST_DATE;                             
  A_FST_E_TRAN_DATE/YYMD = FST_E_TRAN_DATE;                             
  A_FST_E_EFFECTIVE_DATE/YYMD = FST_E_EFFECTIVE_DATE;                   
  TRAN_TYPE/A2 = IF FST_E_TRAN_CODE EQ '01' OR '21' THEN 'DB' ELSE      
                 IF FST_E_TRAN_CODE EQ '02' OR '22' THEN 'CR' ELSE 'ER';
 END                                                                    
 -*                                                                     
 MATCH FILE GLHLDFST                                                    
     PRINT FST_E_GLACCT_NBR AS 'GLACCT NBR'                             
           FST_E_INST_NBR AS 'INST NBR'                                 
           FST_E_TRAN_CODE AS 'TR CODE'                                 
           TRAN_TYPE AS 'TR TYPE'                                       
           FST_E_TRAN_DESC AS 'DESC'                                    
           FST_E_TRAN_AMT AS 'TRAN AMT'                                 
           FST_E_TRAN_DATE AS 'TRAN DATE'                               
           FST_E_POST_DATE AS 'POST DATE'                               
          FST_E_EFFECTIVE_DATE AS 'EFF DATE'
BY FST_GRP_KEY3 NOPRINT                     
WHERE A_FST_E_TRAN_AMT GE 100000;           
WHERE A_FST_E_POST_DATE GE &LAD;            
WHERE A_FST_E_POST_DATE LE &EAD;            
RUN                                         
FILE GLHLDFDV                               
PRINT FDV_E_GLACCT_DESC                     
BY FDV_GRP_KEY AS 'FST_GRP_KEY3' NOPRINT
BY FDV_E_GLACCT_DESC NOPRINT            
ON TABLE SET BYDISPLAY ON               
AFTER MATCH HOLD AS 'GLMATCH' OLD       
END                                     
DEFINE FILE GLMATCH                     
  A_FST_E_TRAN_AMT/D19.2 = EDIT(FST_E_TRAN_AMT);                        
  TRAN_TYPE/A2 = IF FST_E_TRAN_CODE EQ '01' OR '21' THEN 'DB' ELSE      
                 IF FST_E_TRAN_CODE EQ '02' OR '22' THEN 'CR' ELSE 'ER';
 END                                                                    
 TABLE FILE GLMATCH                                                     
     PRINT FST_E_GLACCT_NBR AS 'GLACCT NBR'                             
           FST_E_INST_NBR AS 'INST NBR'                                 
           FST_E_TRAN_CODE AS 'TR CODE'                                 
           TRAN_TYPE AS 'TR TYPE'                                       
           FST_E_TRAN_DESC AS 'TRAN DESC'                               
           A_FST_E_TRAN_AMT AS 'TRAN AMT'                               
           FST_E_TRAN_DATE AS 'TRAN DATE'                               
           FST_E_POST_DATE AS 'POST DATE'                               
           FST_E_EFFECTIVE_DATE AS 'EFF DATE'                           
           FDV_E_GLACCT_DESC AS 'GL DESC'                                
ON TABLE HOLD AS 'XLREPORT' FORMAT EXCEL2K                                 
END                                       
-RUN                                      
-INCLUDE RUNTRAIL                         
-QUIT                                     


I also tried to put the SET BYDISPLAY ON right before the ON TABLE HOLD AS 'XLREPORT' also and at that point it was too late. The matched file, GLMATCH, is already missing the duplicate descriptions. Can this be done with a MATCH?


FOCUS for Mainframe 7.2
Windows and IBM Z9 Mainframe processor
FOCUS, Excel


 
Posts: 21 | Registered: October 31, 2008Report This Post
Expert
posted Hide Post
Hi tinamshorty,

Here is something to look into: There is no setting to do what they want. It will need to be done with code that will create the additional data entries. Here is a sample:

SET ASNAMES=ON
MATCH FILE CAR
PRINT MODEL
BY COUNTRY
RUN
FILE CAR
PRINT COUNTRY AS COUNTRY2
BY COUNTRY
AFTER MATCH HOLD OLD-AND-NEW
END
DEFINE FILE HOLD
PRINTVAL/A10=IF COUNTRY2 EQ ' ' OR COUNTRY2 IS MISSING THEN PRINTVAL ELSE COUNTRY2;
END
TABLE FILE HOLD
PRINT * PRINTVAL
END


Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
 
Posts: 1948 | Location: New York | Registered: November 16, 2004Report This Post
Virtuoso
posted Hide Post
You could also try to change the PRINT in a SUM. Within MATCH these two verbs have different results, even if they come up with the the same amount of records. The difference is documented somewhere, I do not remember exactly where.
So: change
FILE GLHLDFDV                               
PRINT FDV_E_GLACCT_DESC                     
BY FDV_GRP_KEY AS 'FST_GRP_KEY3' NOPRINT
BY FDV_E_GLACCT_DESC NOPRINT

to:
FILE GLHLDFDV                               
SUM FDV_E_GLACCT_DESC                     
BY FDV_GRP_KEY AS 'FST_GRP_KEY3' NOPRINT
BY FDV_E_GLACCT_DESC NOPRINT

and see what happens.

Oh, BTW, ON TABLE SET BYDISPLAY ON has no use whatsoever within the MATCH command. It is meant only for output to excel.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Virtuoso
posted Hide Post
TinamShorty,

I would not use NOPRINT in a MATCH command because in any case the fields appear in the HOLD file.

You can read all about MATCH FILE in wf76crlang.pdf, chapter 16, especially the use of PRINT and SUM for 1-to-1 and 1-to-many relationships.

BYDISPLAY works for all TABLE output formats (HTML, PDF, EXCEL etc.)


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, 2006Report This Post
Master
posted Hide Post
Have you tried doing a join? Since you want to keep the data in the host file whether it gets a match or not, you will need SET ALL=PASS
before the join.


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report This Post
Member
posted Hide Post
Thanks for all the responses everyone. I was able to do a JOIN, but would like to go back and revisit the MATCH function again.
Unfortunately I am in the middle of five projects and this one will have to wait for a short time.
I will post again when I am able to try your many suggestions.
I will close this post for now and repost when/if necessary.


FOCUS for Mainframe 7.2
Windows and IBM Z9 Mainframe processor
FOCUS, Excel


 
Posts: 21 | Registered: October 31, 2008Report 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     [CLOSED] Blanks for duplicate values in Excel file

Copyright © 1996-2020 Information Builders