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] -SET &TERM and &TERM2 (automatic minus one year)

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] -SET &TERM and &TERM2 (automatic minus one year)
 Login/Join
 
Member
posted
I have -SET &TERM and &TERM2 when &TERM = Fall 2018/Summer 2018, &TERM2 = Fall 2017/Summer 2017

For example, Fall 2018 data is 06062018 data then Fall 2017 data should be 06062017, worked fine for Fall or Summer 2018,

But when comes to &TERM = Spring 2019, &TERM2 = 'Spring 2018', Spring 2019 data is 06062018, Spring 2018 data is not 06062017......


-DEFAULT &POSOF2 = '13';

-*-TYPE &TERM;
-SET &POSOF2 = POSIT(&TERM,50,'2',1,&POSOF2);
-SET &TERMTYPE = SUBSTR(50, &TERM, 1, &POSOF2-1, &POSOF2-1, 'A11V');
-SET &TERMTYPE2 = TRIMV('T',&TERMTYPE,15,' ',1,'A11V');
-SET &YEAR_TERM1 = SUBSTR(50, &TERM, &POSOF2,&POSOF2+3,4,'A4');
-SET &YEAR_TERM2 = &YEAR_TERM1 - 1;
-SET &TERM2 = &TERMTYPE2 | ' '| &YEAR_TERM2;


MATCH FILE AAE_GRAD3
SUM
APPTOTAL1 AS 'APPTOTAL_TERM1'
ADMTOTAL1 AS 'ADMTOTAL_TERM1'
ENRLTOTAL1 AS 'ENRLTOTAL_TERM1'
APPDOM AS 'APPDOM_TERM1'
APPINT AS 'APPINT_TERM1'
ADMDOM AS 'ADMDOM_TERM1'
ADMINTL AS 'ADMINTL_TERM1'
ENRLDOM AS 'ENRLDOM_TERM1'
ENRLINTL AS 'ENRLINTL_TERM1'
BY MONTH_DAY
BY COLL3
BY DEGREE
BY MAJOR
WHERE AAE_GRAD3.AAE_GRAD3.TERMDESC EQ '&TERM.(FIND AAE_GRAD3.AAE_GRAD3.TERMDESC IN AAE_GRAD3 |FORMAT=A6V).TERM:.';
RUN
FILE AAE_GRAD3
SUM
APPTOTAL1 AS 'APPTOTAL_TERM2'
ADMTOTAL1 AS 'ADMTOTAL_TERM2'
ENRLTOTAL1 AS 'ENRLTOTAL_TERM2'
APPDOM AS 'APPDOM_TERM2'
APPINT AS 'APPINT_TERM2'
ADMDOM AS 'ADMDOM_TERM2'
ADMINTL AS 'ADMINTL_TERM2'
ENRLDOM AS 'ENRLDOM_TERM2'
ENRLINTL AS 'ENRLINTL_TERM2'
TODAYS_DATE AS 'TD2'
TERM AS 'TERM2'
COLL3 AS 'COLL2'
MAJOR AS 'MAJOR2'
DEGREE AS 'DEGREE2'
BY MONTH_DAY
BY COLL3
BY DEGREE
BY MAJOR
WHERE TERMDESC EQ '&TERM2';
AFTER MATCH HOLD AS HOLD1A OLD-OR-NEW
END

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8
Windows, All Outputs
 
Posts: 2 | Registered: August 12, 2015Report This Post
Expert
posted Hide Post
How about something like, adjust the dates as required:
-SET &TERM1beg = 06012018 ;
-SET &TERM1end = 06302018 ;
-SET &TERM1hdg = 'Term1 ' | '&TERM1beg.EVAL' | ' to ' | '&TERM1end.EVAL' ||'.' ;
-SET &TERM2beg = 07012018 ;
-SET &TERM2end = 07312018 ;
-SET &TERM2hdg = 'Term2 ' | '&TERM2beg.EVAL' | ' to ' | '&TERM2end.EVAL' ||'.' ;

TABLE FILE CAR
SUM DCOST
HEADING
"&TERM1hdg"
"&TERM2hdg"
BY COUNTRY
END

RESULTS:
Term1 06012018 to 06302018. 
Term2 07012018 to 07312018. 
 
Country        Dealer Cost 
ENGLAND        37,853 
FRANCE          4,631 
ITALY          41,235 
JAPAN           5,512 
W GERMANY      54,563 




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report 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] -SET &TERM and &TERM2 (automatic minus one year)

Copyright © 1996-2020 Information Builders