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.
I have a report that runs as default for current periods weeks. My current period in report is usually a week before current first calender week of period. For example: June 26 is start of my fiscal year 2011 calender and fist week of first fiscal period of 2011. My report used to run using FOC_NONE and automatic schedule in report caster. When I run this report with default paremets, its showing me current 2011 period 1 and week 1 instead of 2010 period 12 and week 1,2,3,4,5. I am not sure what is wrong with my following code. Can someone point out the problem if you understand the following code?
-TYPE ===========================
-TYPE REPTYPE = &REPTYPE.(<Division/District,DIVISION>,<Brand,BRAND>).
-TYPE DIVISION = &DIVISION.(<All Divisions,FOC_NONE>,<8410-Arizona/courtyard,8410>,<8102-Central Region,8102>,<8110-Central/montessori,8110>,<8000-Corporate Headquarters,8000>,<8500-East,8500>,<9998-Franchise District,9998>,<8101-Midwest,8101>,<8650-Southeast,8650>,<8106-Southwest,8106>,<0000-Unknown,0000>,<8600-West,8600>).
-TYPE YEAR = &YEAR.(<Current FYPW, FOC_NONE>, <2011,2011>, <2010,2010>,<2009,2009>,<2008,2008>).
-TYPE PERIOD = &PERIOD.(<1,01>,<2,02>,<3,03>,<4,04>,<5,05>,<6,06>,<7,07>,<8,08>,<9,09>,<10,10>,<11,11>,<12,12>).
-TYPE WEEK = &WEEK.(<1,1>,<2,2>,<3,3>,<4,4>,<5,5>).
-TYPE BRAND = &BRAND.(<All Brands,FOC_NONE>,<CCY,ccy>,<CT,ct>,<LPA,lpa>,<MU,mu>,<TT,tt>,<Unk,Unk>).
-TYPE DISTRICT = &DISTRICT.(<All Districts,FOC_NONE>,<0000-Unknown,0000>,<8151-Illinois 2,8151>,<8152-Indiana,8152>,<8153-Kansas City,8153>,<8154-Kansas,8154>,<8155-Greater Baltimore,8155>,<8156-Columbus,8156>,<8157-Dayton / West Chester,8157>,<8158-Nj / Pa,8158>,<8159-St. Louis,8159>,<8161-N. Va / Md 2,8161>,<8162-Hampton Roads,8162>,<8163-Madison,8163>,<8164-Illinois 1,8164>,<8165-Phoenix 1,8165>,<8168-Orange County I,8168>,<8169-Sacramento,8169>,<8170-Bay Area,8170>,<8171-San Diego,8171>,<8173-Colorado,8173>,<8175-Nebraska - Iowa,8175>,<8176-New Mexico,8176>,<8177-Nevada,8177>,<8179-N. Wa,8179>,<8180-Montessori,8180>,<8181-Alabama,8181>,<8182-Central Florida,8182>,<8183-East Coast Florida,8183>,<8184-Gulf Coast Florida,8184>,<8185-South Georgia,8185>,<8186-North Georgia,8186>,<8187-Orlando,8187>,<8188-Knoxville,8188>,<8189-Charlotte,8189>,<8190-Raleigh / Durham,8190>,<8193-South Carolina,8193>,<8194-South Florida,8194>,<8195-Austin,8195>,<8197-Forth Worth,8197>,<8198-North Houston,8198>,<8201-South Oklahoma,8201>,<8202-North Oklahoma,8202>,<8203-San Antonio,8203>,<8205-N. Va / Md 1,8205>,<8207-Memphis,8207>,<8209-Panhandle Florida,8209>,<8401-Ccy South Dfw,8401>,<8403-Ccy East Dfw,8403>,<8404-Ccy West Dfw,8404>,<8405-Ccy Austin,8405>,<8406-Ccy Houston,8406>,<8407-Ccy Managed Schools,8407>,<8411-Ccy Region Mgd Schools,8411>,<8504-North Florida,8504>,<8505-Eastern Ohio,8505>,<8506-Michigan I,8506>,<8513-Akron,8513>,<8514-Michigan Ii,8514>,<8516-Minnesota,8516>,<8518-Southern Ohio / Ky,8518>,<8519-Michigan Iii,8519>,<8601-Central Ca,8601>,<8602-Las Vegas,8602>,<8604-S. Wa,8604>,<8608-Tucson,8608>,<8609-Phoenix 2,8609>,<8610-Phoenix 3,8610>,<8612-Phoenix 4,8612>,<8614-Inland Empire I,8614>,<8621-Orange County Ii,8621>,<8622-San Fernando Valley,8622>,<8623-Inland Empire Ii,8623>,<8702-Va Beach,8702>,<8703-Manassas - Centreville,8703>,<8704-Richmond,8704>,<8705-South Houston,8705>,<8707-Greensboro / Winston-salem,8707>,<8708-Rochester / Buffalo,8708>,<8709-Albany - Syracuse,8709>,<8710-North Dallas,8710>,<8712-East Dallas,8712>,<8803-Franchise CT DE NJ NY PA CAN,8803>,<8805-Chicago,8805>,<8808-Greater Philadelphia,8808>,<8809-Jacksonville,8809>,<8812-Franchise CA MN,8812>,<8814-Metro Ny,8814>,<8815-West Michigan,8815>,<8999-Unallocated School,8999>).
-TYPE OUTPUT = &WFFMT.(<HTML,HTML>,<Excel,EXL2K>,<Active Report,AHTML>,<PDF,PDF>).Output.
-*
SET HOLDLIST = PRINTONLY
SET ASNAMES = ON
-DEFAULT &CAST = 'NO';
-*
-SET &UNIT1_FIELD = IF &REPTYPE EQ 'BRAND' AND &BRAND EQ 'FOC_NONE' THEN 'CORP' ELSE
- IF &REPTYPE EQ 'BRAND' AND &BRAND NE 'FOC_NONE' THEN 'UPBRAND' ELSE
- IF &REPTYPE EQ 'DIVISION' AND &DIVISION EQ 'FOC_NONE' AND &DISTRICT EQ 'FOC_NONE' THEN 'CORP' ELSE
- IF &REPTYPE EQ 'DIVISION' AND &DIVISION NE 'FOC_NONE' AND &DISTRICT EQ 'FOC_NONE' THEN 'DIVISIONNAME' ELSE
- 'DISTRICTNAME';
-SET &UNIT2_FIELD = IF &REPTYPE EQ 'BRAND' AND &BRAND EQ 'FOC_NONE' THEN 'UPBRAND' ELSE
- IF &REPTYPE EQ 'DIVISION' AND &DIVISION EQ 'FOC_NONE' THEN 'DIVISIONNAME' ELSE
- IF &REPTYPE EQ 'DIVISION' AND &DISTRICT EQ 'FOC_NONE' THEN 'DISTRICTNAME' ELSE
- 'SCHOOLID';
-SET &UNIT1_WHFIELD = IF &CAST EQ 'YES' THEN 'FOC_NONE' ELSE
- IF &REPTYPE EQ 'BRAND' AND &BRAND EQ 'FOC_NONE' THEN 'FOC_NONE' ELSE
- IF &REPTYPE EQ 'BRAND' AND &BRAND NE 'FOC_NONE' THEN 'BRAND' ELSE
- IF &REPTYPE EQ 'DIVISION' AND &DIVISION EQ 'FOC_NONE' AND &DISTRICT EQ 'FOC_NONE' THEN 'FOC_NONE' ELSE
- IF &REPTYPE EQ 'DIVISION' AND &DIVISION NE 'FOC_NONE' AND &DISTRICT EQ 'FOC_NONE' THEN 'DIVISIONID' ELSE
- 'DISTRICTID';
-SET &BURST = IF &UNIT1_FIELD EQ 'DIVISIONNAME' THEN 'MAX.DIVISIONID' ELSE
- IF &UNIT1_FIELD EQ 'DISTRICTNAME' THEN 'MAX.DISTRICTID' ELSE
- IF &UNIT1_FIELD EQ 'SCHOOLID ' THEN 'MAX.SCHOOLID' ELSE ' ';
-
-SET &UNIT1_VAL = IF &BRAND NE 'FOC_NONE' THEN &BRAND ELSE
- IF &DISTRICT NE 'FOC_NONE' THEN &DISTRICT ELSE
- IF &DIVISION NE 'FOC_NONE' THEN &DIVISION ELSE 'FOC_NONE';
-SET &UNIT1_TITLE = IF &REPTYPE EQ 'BRAND' AND &BRAND EQ 'FOC_NONE' THEN 'Corp.' ELSE
- IF &REPTYPE EQ 'BRAND' AND &BRAND NE 'FOC_NONE' THEN 'Brand' ELSE
- IF &REPTYPE EQ 'DIVISION' AND &DIVISION EQ 'FOC_NONE' AND &DISTRICT EQ 'FOC_NONE' THEN 'Corp.' ELSE
- IF &REPTYPE EQ 'DIVISION' AND &DIVISION NE 'FOC_NONE' AND &DISTRICT EQ 'FOC_NONE' THEN 'Division' ELSE
- 'District';
-SET &UNIT2_TITLE = IF &REPTYPE EQ 'BRAND' AND &BRAND EQ 'FOC_NONE' THEN 'Brand' ELSE
- IF &REPTYPE EQ 'DIVISION' AND &DIVISION EQ 'FOC_NONE' THEN 'Division' ELSE
- IF &REPTYPE EQ 'DIVISION' AND &DISTRICT EQ 'FOC_NONE' THEN 'District' ELSE
- 'School';
-*
-IF &YEAR NE 'FOC_NONE' THEN GOTO SET_FYPW_0;
-SET &DAYINWEEK = DECODE &DATEW ( '6' '-1' '0' '-2' '1' '-3' '2' '-4' '3' '-5' '4' '-6' '5' '-7');
-SET &DATE_0 = AYMD(&YYMD,&DAYINWEEK,'I8');
-SET &DATE_0 = EDIT(&DATE_0,'9999-99-99');
-*
TABLE FILE DIM_TIME
PRINT
'DIM_TIME.DIM_TIME.FYPW/A7'
'DIM_TIME.DIM_TIME.DATE'
WHERE DIM_TIME.DIM_TIME.DATE EQ '&DATE_0';
ON TABLE NOTOTAL
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS FYPW FORMAT ALPHA
END
-RUN
-READ FYPW &FYPW_0.A7.
-GOTO OTHER_TIMES
-SET_FYPW_0
-SET &FYPW_0 = &YEAR || &PERIOD || &WEEK ;
-
-*
-OTHER_TIMES
-SET &FYP_0 = EDIT(&FYPW_0, '999999');
-SET &FYP_1 = AYM(&FYP_0, -1, 'I6');
-SET &FYP_2 = AYM(&FYP_0, -2, 'I6');
-SET &FYP_3 = AYM(&FYP_0, -3, 'I6');
-SET &FYP_12 = AYM(&FYP_0, -12, 'I6');
-SET &FYP_13 = AYM(&FYP_0, -13, 'I6');
-SET &NUMWKS = IF EDIT(&FYP_0, '$$$$99') EQ '03' OR '06' OR '09' OR '12' THEN '5' ELSE '4';
-*
-SET &W_0 = EDIT(&FYPW_0 , '$$$$$$9');
-SET &W_1 = DECODE &W_0 ( 5 4 4 3 3 2 2 1 1 'FOC_NONE');
-SET &W_2 = DECODE &W_1 ( 4 3 3 2 2 1 1 'FOC_NONE');
-SET &W_3 = DECODE &W_2 ( 3 2 2 1 1 'FOC_NONE');
-SET &W_4 = DECODE &W_3 ( 2 1 1 'FOC_NONE');
-*
-SET &P_0 = EDIT(&FYP_0 , '$$$$99');
-SET &P_1 = EDIT(&FYP_1 , '$$$$99');
-SET &P_2 = EDIT(&FYP_2 , '$$$$99');
-SET &P_3 = EDIT(&FYP_3 , '$$$$99');
-SET &P_12 = EDIT(&FYP_12, '$$$$99');
-SET &P_13 = EDIT(&FYP_13, '$$$$99');
-*
-SET &FY_0 = EDIT(&FYP_0 , '9999');
-SET &FY_1 = EDIT(&FYP_1 , '9999');
-SET &FY_2 = EDIT(&FYP_2 , '9999');
-SET &FY_3 = EDIT(&FYP_3 , '9999');
-SET &FY_12= EDIT(&FYP_12, '9999');
-SET &FY_13= EDIT(&FYP_13, '9999');
-*
-*-TYPE Inputs
-*-TYPE ===========================
-*-TYPE REPTYPE = &REPTYPE
-*-TYPE BRAND = &BRAND
-*-TYPE DIVISION = &DIVISION
-*-TYPE DISTRICT = &DISTRICT
-TYPE Criteria
-TYPE ===========================
-TYPE UNIT1_FIELD = &UNIT1_FIELD
-TYPE UNIT1_TITLE = &UNIT1_TITLE
-TYPE UNIT2_FIELD = &UNIT2_FIELD
-TYPE UNIT2_TITLE = &UNIT2_TITLE
-TYPE UNIT1_WHFIELD = &UNIT1_WHFIELD
-TYPE UNIT1_VAL = &UNIT1_VAL
-TYPE BURST = &BURST
-TYPE ---------------------
-TYPE FYPW_0 = &FYPW_0
-TYPE FYP_0 = &FYP_0
-TYPE FYP_1 = &FYP_1
-TYPE FYP_2 = &FYP_2
-TYPE FYP_3 = &FYP_3
-TYPE FYP_12 = &FYP_12
-TYPE FYP_13 = &FYP_13
-TYPE NUMWKS = &NUMWKS
-TYPE ---------------------
-TYPE W_0 = &W_0
-TYPE W_1 = &W_1
-TYPE W_2 = &W_2
-TYPE W_3 = &W_3
-TYPE W_4 = &W_4
-TYPE ---------------------
-TYPE P_0 = &P_0
-TYPE P_1 = &P_1
-TYPE P_2 = &P_2
-TYPE P_3 = &P_3
-TYPE P_12 = &P_12
-TYPE P_13 = &P_13
-TYPE ---------------------
-TYPE FY_0 = &FY_0
-TYPE FY_1 = &FY_1
-TYPE FY_2 = &FY_2
-TYPE FY_3 = &FY_3
-TYPE FY_12 = &FY_12
-TYPE FY_13 = &FY_13
-TYPE ---------------------
This message has been edited. Last edited by: Kerry,
I think issue is in the code somewhere. MY DIM_TIME table have following field names: 1 fypW 2 FYP 3 date 4 FY 5 PERIOD 6 WEEK 7CY &DATE_0 is being set to run date or current date. What does FOC_NONE do in a date parameter?
Besides the fields in your dim table, what are the values in those fields? Are you able to just show these fields without all the defines and typing around it?
what value would you expect for the selected teble request
TABLE FILE DIM_TIME
PRINT
'DIM_TIME.DIM_TIME.FYPW/A7'
'DIM_TIME.DIM_TIME.DATE'
WHERE DIM_TIME.DIM_TIME.DATE EQ '&DATE_0';
ON TABLE NOTOTAL
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS FYPW FORMAT ALPHA
END
BTW who made this code? You are using FOC_NONE and see not to know what it does...
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006
FOC_NONE causes the line that contains it to be skipped from the execution stack. That means that every line of non-dialog manager code will not be executed if it contains the text FOC_NONE. Since the code shown here does not have the FOC_NONE text (either as literal or in a variable) on any one line, I think the problem is not in this particular piece of code. And if it is, we can't detect it because the rest of the code is not shown.
Waz: &DATEW is a system variable and contains the current day of the week.
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
I changed the code a bit to get it worked with CAR
-*
-* TABLE FILE DIM_TIME
-* PRINT
-* 'DIM_TIME.DIM_TIME.FYPW/A7'
-* 'DIM_TIME.DIM_TIME.DATE'
-* WHERE DIM_TIME.DIM_TIME.DATE EQ '&DATE_0';
-* ON TABLE NOTOTAL
-* ON TABLE SET HOLDLIST PRINTONLY
-* ON TABLE HOLD AS FYPW FORMAT ALPHA
-* END
TABLE FILE CAR
PRINT COMPUTE FYPW/A7='2010054';
WHERE COUNTRY EQ 'ITALY';
ON TABLE HOLD AS FYPW FORMAT ALPHA
END
now the code runs, but all it does is a lot of typing on screen and I have no idea what it should do....