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] Months past as column headings

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Months past as column headings
 Login/Join
 
Gold member
posted
Afternoon All,

Anyone done anything like this for use in column headings?

This works with "M" format however doesn't work with "Mtr". Can you redefine a format of the column heading like you can an actual column of data?

  
-SET &MNT=&DATEMtr
-SET &MNT2=&DATEMtr-1;
-SET &MNT3=&DATEMtr-2;
-SET &MNT4=&DATEMtr-3;
-SET &MNT5=&DATEMtr-4;
-SET &MNT6=&DATEMtr-5;


Our table puts information in the following format.

Demand This Month|Demand Last Month|Demand 2 Months Ago|Ect.

This message has been edited. Last edited by: John C.,


WF 7703 Outputs all
Windows 7 32
DB2 CLI
 
Posts: 59 | Registered: August 09, 2012Report This Post
Virtuoso
posted Hide Post
One possibility:

-SET &START_MONTH = &DATEYY | &DATEM ;
-*
-REPEAT ENDREPEAT1 FOR &I FROM 0 TO 4
-SET &YEAR_MONTH     = AYM(&START_MONTH,-&I,'I6YYM');
-SET &MONTH_TITLE.&I = LCWORD(9,CHGDAT('YYM','MX',&YEAR_MONTH,'A9'),'A9');
-TYPE &MONTH_TITLE.&I
-ENDREPEAT1


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Gold member
posted Hide Post
quote:
-SET &START_MONTH = &DATEYY | &DATEM ;
-*
-REPEAT ENDREPEAT1 FOR &I FROM 0 TO 4
-SET &YEAR_MONTH = AYM(&START_MONTH,-&I,'I6YYM');
-SET &MONTH_TITLE.&I = LCWORD(9,CHGDAT('YYM','MX',&YEAR_MONTH,'A9'),'A9');
-TYPE &MONTH_TITLE.&I
-ENDREPEAT1


Dan,

The solution works perfectly. I was hoping you could elaborate on some of the syntax that you used. Some of them I have not seen yet.

AYM = Date control function?
LCWORD = Never seen this one before..

I want to understand so I never have to ask again.

Thank you again for your help!

JC


WF 7703 Outputs all
Windows 7 32
DB2 CLI
 
Posts: 59 | Registered: August 09, 2012Report This Post
Expert
posted Hide Post
"LCWORD = Never seen this one before.."

The DevStudio Help has a very thorough documentation library.

DevStudio > Help > Contents > Developer Studio Online Help > WebFOCUS 7.7. Language Documentation > Using Functions


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
Expert
posted Hide Post
download and commit to memory
Using Functions




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Gold member
posted Hide Post
Thanks all for your help, looks like I have some reading material for the next few nights!

JC


WF 7703 Outputs all
Windows 7 32
DB2 CLI
 
Posts: 59 | Registered: August 09, 2012Report This Post
Gold member
posted Hide Post
Sorry one more question:

Currently it looks like this:
  
     NPFDMD.NPFDMD.MOTD01 AS 'This Month'
     NPFDMD.NPFDMD.MOTD02 AS 'Last Month'
     NPFDMD.NPFDMD.MOTD03 AS '2 Months Ago'
     NPFDMD.NPFDMD.MOTD04 AS '3 Months Ago'
     NPFDMD.NPFDMD.MOTD05 AS '4 Months Ago'
     NPFDMD.NPFDMD.MOTD06 AS '5 Months Ago'


Does it change to this? It was asking the value of it before the report ran.

  
     NPFDMD.NPFDMD.MOTD01 AS '&MONTH_TITLE.0'
     ECT.


WF 7703 Outputs all
Windows 7 32
DB2 CLI
 
Posts: 59 | Registered: August 09, 2012Report This Post
Virtuoso
posted Hide Post
The dot is not part of the variable name. When necessary, the dot is used as a delimiter to mark the end of a variable name.

NPFDMD.NPFDMD.MOTD01 AS '&MONTH_TITLE0'
NPFDMD.NPFDMD.MOTD02 AS '&MONTH_TITLE1'
NPFDMD.NPFDMD.MOTD03 AS '&MONTH_TITLE2'
NPFDMD.NPFDMD.MOTD04 AS '&MONTH_TITLE3'
NPFDMD.NPFDMD.MOTD05 AS '&MONTH_TITLE4'
NPFDMD.NPFDMD.MOTD06 AS '&MONTH_TITLE5'

This message has been edited. Last edited by: Dan Satchell,


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Gold member
posted Hide Post
 
-SET &START_MONTH = &DATEYY | &DATEM ;
-*
-REPEAT ENDREPEAT1 FOR &I FROM 0 TO 4
-SET &YEAR_MONTH     = AYM(&START_MONTH,-&I,'I6YYM');
-SET &MONTH_TITLE.&I = LCWORD(9,CHGDAT('YYM','MX',&YEAR_MONTH,'A9'),'A9');
-ENDREPEAT1

TABLE FILE NPFDMD

PRINT
NPFDMD.NPFDMD.MOTD01 AS '&MONTH_TITLE0'
NPFDMD.NPFDMD.MOTD02 AS '&MONTH_TITLE1'
NPFDMD.NPFDMD.MOTD03 AS '&MONTH_TITLE2'
NPFDMD.NPFDMD.MOTD04 AS '&MONTH_TITLE3'
NPFDMD.NPFDMD.MOTD05 AS '&MONTH_TITLE4'
NPFDMD.NPFDMD.MOTD06 AS '&MONTH_TITLE5'
BY  LOWEST NPFDMD.NPFDMD.NPITEM AS 'Item#,'
BY  LOWEST NPFDMD.NPFDMD.NPWHSE AS 'WHSE'
ON TABLE SUBHEAD
"Y-Screen Demand History &NPITEM"
WHERE NPFDMD.NPFDMD.NPITEM EQ '&NPITEM.(<NPITEM,NPFDMD.NPFDMD.NPITEM>).Item#.';


I thought I did everything correctly. However I'm getting a parameter prompt for all &Month_TITLE 0-4. Was there something I missed?

John


WF 7703 Outputs all
Windows 7 32
DB2 CLI
 
Posts: 59 | Registered: August 09, 2012Report This Post
Expert
posted Hide Post
make sure you have prompt for parms turned off in your fex properties.
stop your fex after your loop and check your progress.
-SET &START_MONTH = &DATEYY | &DATEM ;
-*
-REPEAT ENDREPEAT1 FOR &I FROM 0 TO 4
-SET &YEAR_MONTH     = AYM(&START_MONTH,-&I,'I6YYM');
-SET &MONTH_TITLE.&I = LCWORD(9,CHGDAT('YYM','MX',&YEAR_MONTH,'A9'),'A9');
-ENDREPEAT1

-? &MONTH_TITLE
-EXIT




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Gold member
posted Hide Post
Sorry for the late response. This worked perfect with the following code and the paramaters turned off.

  
-SET &START_MONTH = &DATEYY | &DATEM ;
-*
-REPEAT ENDREPEAT1 FOR &I FROM 0 TO 6
-SET &YEAR_MONTH     = AYM(&START_MONTH,-&I,'I6YYM');
-SET &MONTH_TITLE.&I = LCWORD(9,CHGDAT('YYM','MX',&YEAR_MONTH,'A9'),'A9');
-ENDREPEAT1

TABLE FILE NPFDMD
PRINT
     NPFDMD.NPFDMD.MOTD01 AS '&MONTH_TITLE0'
     NPFDMD.NPFDMD.MOTD02 AS '&MONTH_TITLE1'
     NPFDMD.NPFDMD.MOTD03 AS '&MONTH_TITLE2'
     NPFDMD.NPFDMD.MOTD04 AS '&MONTH_TITLE3'
     NPFDMD.NPFDMD.MOTD05 AS '&MONTH_TITLE4'
     NPFDMD.NPFDMD.MOTD06 AS '&MONTH_TITLE5'


Thank you once again for all your help!

This message has been edited. Last edited by: John C.,


WF 7703 Outputs all
Windows 7 32
DB2 CLI
 
Posts: 59 | Registered: August 09, 2012Report 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] Months past as column headings

Copyright © 1996-2020 Information Builders