-*-*-TYPE WEBFOCUS CGIVAR WF_BURST_OUTPUT=OFF
-SET TRACEON=ALL;
-SET TRACEUSER=ON;
-SET &ECHO=ALL;
-* // Default the value for when nothing is passed.
-DEFAULT &CHR = 'BYMONTH';
-DEFAULT &LOC = 'IGGY';
-DEFAULT &TRIB = 'IGGY';
-DEFAULT &RETURN_EFFECT = 'C';
-DEFAULT &BEGIN_MONTH = 200609;
-DEFAULT &END_MONTH = 200709;
-DEFAULT &FACILITY_CODE = 'FOC_NONE';
-DEFAULT &STORE_CODE = 'FOC_NONE';
-DEFAULT &CUST_CLASS_CODE = 'FOC_NONE';
-DEFAULT &CUST_NUMBER = 'FOC_NONE';
-DEFAULT &PL_NUMBER = 'FOC_NONE';
-DEFAULT &SALES_ACCT_CODE = 'FOC_NONE';
-DEFAULT &GROUP_NUMBER = 'FOC_NONE';
-DEFAULT &SUB_GROUP_NUMBER = 'FOC_NONE';
-DEFAULT &ITEM_NUMBER = 'FOC_NONE';
-DEFAULT &CUST_CLASS_CODE = 'FOC_NONE';
-DEFAULT &YEAR_COUNT = '1';
-DEFAULT &MTD_PRORATE = 'True';
-DEFAULT &USE_VIEWER = 'False';
-DEFAULT &SBGT = 'True';
-DEFAULT &STRTRAIL = 'FOC_NONE';
-SET &TIT_RETEFF = IF &RETURN_EFFECT EQ 'C' THEN '' ELSE IF &RETURN_EFFECT EQ 'R' THEN ' Returns Excluded' ELSE IF &RETURN_EFFECT EQ 'S' THEN ' Sales Only';
-SET &TIT_DIV = IF &FACILITY_CODE EQ 'FOC_NONE' THEN '' ELSE ' For Division ' | &FACILITY_CODE;
-SET &TIT_STORE = IF &STORE_CODE EQ 'FOC_NONE' THEN '' ELSE ' For Store ' | &STORE_CODE;
-SET &TIT_CUST_CL = IF &CUST_CLASS_CODE EQ 'FOC_NONE' THEN '' ELSE ' For Cust Class ' | &CUST_CLASS_CODE ;
-SET &TIT_CUST_NUM = IF &CUST_NUMBER EQ 'FOC_NONE' THEN '' ELSE ' For Customer ' | &CUST_NUMBER;
-SET &TIT_PL_NUM = IF &PL_NUMBER EQ 'FOC_NONE' THEN '' ELSE ' For PL ' | &PL_NUMBER;
-SET &TIT_SALES_ACCT = IF &SALES_ACCT_CODE EQ 'FOC_NONE' THEN '' ELSE ' For Sales Acct Code ' | &SALES_ACCT_CODE;
-SET &TIT_GROUP_NUM = IF &GROUP_NUMBER EQ 'FOC_NONE' THEN '' ELSE ' For Group ' | &GROUP_NUMBER;
-SET &TIT_SUB_GRP = IF &SUB_GROUP_NUMBER EQ 'FOC_NONE' THEN '' ELSE ' For Subgroup ' | &SUB_GROUP_NUMBER;
-SET &TIT_ITEM_NUM = IF &ITEM_NUMBER EQ 'FOC_NONE' THEN '' ELSE ' For Item ' | &ITEM_NUMBER;
-SET &TIT_CUSTCL = IF &CUST_CLASS_CODE EQ 'FOC_NONE' THEN '' ELSE ' For CustClass ' | &CUST_CLASS_CODE;
-SET &TIT_BEGIN_MONTH = IF &BEGIN_MONTH EQ 'FOC_NONE' THEN ' ' ELSE ' For ' | &BEGIN_MONTH;
-SET &TIT_END_MONTH = IF &END_MONTH EQ 'FOC_NONE' THEN ' ' ELSE ' to ' | &END_MONTH;
-SET &TIT_MTD_PRORATE = IF &MTD_PRORATE EQ 'FOC_NONE' THEN ' ' ELSE ' Figures Prorated for all Prior Years based on Todays Date ';
-* because html forms pass quoted values and graphs don't.
-SET &QT = '''';
-SET &FACILITY_CODE1 = IF &FACILITY_CODE OMITS &QT AND &FACILITY_CODE NE 'FOC_NONE' THEN &QT | &FACILITY_CODE | &QT ELSE &FACILITY_CODE;
-SET &STORE_CODE1 = IF &STORE_CODE OMITS &QT AND &STORE_CODE NE 'FOC_NONE' THEN &QT | &STORE_CODE | &QT ELSE &STORE_CODE;
-SET &CUST_NUMBER1 = IF &CUST_NUMBER OMITS &QT AND &CUST_NUMBER NE 'FOC_NONE' THEN &QT | &CUST_NUMBER | &QT ELSE &CUST_NUMBER;
-SET &PL_NUMBER1 = IF &PL_NUMBER OMITS &QT AND &PL_NUMBER NE 'FOC_NONE' THEN &QT | &PL_NUMBER | &QT ELSE &PL_NUMBER;
-SET &GROUP_NUMBER1 = IF &GROUP_NUMBER OMITS &QT AND &GROUP_NUMBER NE 'FOC_NONE' THEN &QT | &GROUP_NUMBER | &QT ELSE &GROUP_NUMBER;
-SET &SUB_GROUP_NUMBER1 = IF &SUB_GROUP_NUMBER OMITS &QT AND &SUB_GROUP_NUMBER NE 'FOC_NONE' THEN &QT | &SUB_GROUP_NUMBER | &QT ELSE &SUB_GROUP_NUMBER;
-SET &ITEM_NUMBER1 = IF &ITEM_NUMBER OMITS &QT AND &ITEM_NUMBER NE 'FOC_NONE' THEN &QT | &ITEM_NUMBER | &QT ELSE &ITEM_NUMBER;
-SET &CUST_CLASS_CODE1 = IF &CUST_CLASS_CODE OMITS &QT AND &CUST_CLASS_CODE NE 'FOC_NONE' THEN &QT | &CUST_CLASS_CODE | &QT ELSE &CUST_CLASS_CODE;
-SET &LOC_DEST = 'LOC_' | &LOC;
-SET &A_DEST = 'A_' | &LOC | &TRIB;
-SET &STRTRAIL = &STRTRAIL || &LOC || &TRIB;
-SET &STRTRAIL_D = IF &STRTRAIL EQ 'FOC_NONE' THEN ' ' ELSE ' Trail ' | &STRTRAIL;
-* // -------------------------------------------------------------------------------------
-* // ---- STEP 1 GOTO - FOR TABLE FILE MATRIX_DIV_MTD OR MATRIX_DIV_MONTHLY -----
-* // -------------------------------------------------------------------------------------
-IF &USE_VIEWER NE 'True' THEN GOTO USE_OLAP ELSE GOTO USE_VIEWA;
-USE_OLAP
-OLAP ON -* SET BACK ON SOME OTHER TIME
-GOTO MY_START;
-USE_VIEWA
ON TABLE SET WEBVIEWER ON
-GOTO MY_START;
-MY_START
TABLE FILE CAR
-* // -------------------------------------------------------------------------------------
-* // ---- STEP 2 GOTO - HANDLE RETURN EFFECT CRITERIA AND ALSO BUDGET INFO -----
-* // -------------------------------------------------------------------------------------
-ADD_DETAILS
SUM
RETAIL_COST/P11BM AS 'Sales,This Yr.'
-IF &YEAR_COUNT GE '1' THEN GOTO P1SALES ELSE GOTO BGT_START;
-P1SALES
RETAIL_COST/P11BM AS 'Sales,Prior Yr.'
-IF &YEAR_COUNT GE '2' THEN GOTO P2SALES ELSE GOTO BGT_START;
-P2SALES
RETAIL_COST/P11BM AS 'Sales Two,Yrs Prior'
-IF &YEAR_COUNT GE '3' THEN GOTO P3SALES ELSE GOTO BGT_START;
-P3SALES
RETAIL_COST/P11BM AS 'Sales Three,Yrs Prior'
-IF &YEAR_COUNT GE '4' THEN GOTO P4SALES ELSE GOTO BGT_START;
-P4SALES
RETAIL_COST/P11BM AS 'Sales Four,Yrs Prior'
-BGT_START
-IF &SBGT EQ 'True' THEN GOTO BGT_INFO ELSE GOTO COMM_START;
-BGT_INFO
DEALER_COST/P11BM AS 'Projected Sales,This Yr.'
-IF &YEAR_COUNT GE '1' THEN GOTO P1BGT ELSE GOTO COMM_START;
-P1BGT
DEALER_COST/P11BM AS 'Projected Sales,Prior Yr.'
-IF &YEAR_COUNT GE '2' THEN GOTO P2BGT ELSE GOTO COMM_START;
-P2BGT
DEALER_COST/P11BM AS 'Projected Sales,Two Yrs Ago'
-IF &YEAR_COUNT GE '3' THEN GOTO P3BGT ELSE GOTO COMM_START;
-P3BGT
DEALER_COST/P11BM AS 'Projected Sales,Three Yrs Ago'
-IF &YEAR_COUNT GE '4' THEN GOTO P4BGT ELSE GOTO COMM_START;
-P4BGT
DEALER_COST/P11BM AS 'Projected Sales,Four Yrs Ago'
-COMM_START
LENGTH/P11BM AS 'Net Comm,This Yr.'
-IF &YEAR_COUNT GE '1' THEN GOTO P1COMM ELSE GOTO MRGPRC_STRT;
-P1COMM
LENGTH/P11BM AS 'Net Comm,Prior Yr.'
-IF &YEAR_COUNT GE '2' THEN GOTO P2COMM ELSE GOTO MRGPRC_STRT;
-P2COMM
LENGTH/P11BM AS 'Net Comm,Two Yrs Prior'
-IF &YEAR_COUNT GE '3' THEN GOTO P3COMM ELSE GOTO MRGPRC_STRT;
-P3COMM
LENGTH/P11BM AS 'Net Comm,Three Yrs Prior'
-IF &YEAR_COUNT GE '4' THEN GOTO P4COMM ELSE GOTO MRGPRC_STRT;
-P4COMM
LENGTH/P11BM AS 'Net Comm,Four Yrs Prior'
-MRGPRC_STRT
COMPUTE bdy_ty_margin_perc/D12.2B = ( (RETAIL_COST - FUEL_CAP) / RETAIL_COST ) * 100;
AS 'Margin %,This Yr.'
-IF &YEAR_COUNT GE '1' THEN GOTO P1MRGPRC ELSE GOTO MRGDL_STRT;
-P1MRGPRC
COMPUTE bdy_1y_margin_perc/D12.2B = ( (RETAIL_COST - FUEL_CAP) / RETAIL_COST ) * 100;
AS 'Margin %,Prior Yr.'
-IF &YEAR_COUNT GE '2' THEN GOTO P2MRGPRC ELSE GOTO MRGDL_STRT;
-P2MRGPRC
COMPUTE bdy_2y_margin_perc/D12.2B = ( (RETAIL_COST - P2FUEL_CAP) / RETAIL_COST ) * 100;
AS 'Margin %,Two Yrs Prior'
-IF &YEAR_COUNT GE '3' THEN GOTO P3MRGPRC ELSE GOTO MRGDL_STRT;
-P3MRGPRC
COMPUTE bdy_3y_margin_perc/D12.2B = ( (RETAIL_COST - FUEL_CAP) / RETAIL_COST ) * 100;
AS 'Margin %,Three Yrs Prior'
-IF &YEAR_COUNT GE '4' THEN GOTO P4MRGPRC ELSE GOTO MRGDL_STRT;
-P4MRGPRC
COMPUTE bdy_4y_margin_perc/D12.2B = ( (RETAIL_COST - FUEL_CAP) / RETAIL_COST ) * 100;
AS 'Margin %,Four Yrs Prior'
-MRGDL_STRT
COMPUTE bdy_ty_margin_doll/P11BM = ( RETAIL_COST - FUEL_CAP);
AS 'Margin $,This Yr.'
-IF &YEAR_COUNT GE '1' THEN GOTO P1MRGDOLL ELSE GOTO ACMRGP_STRT;
-P1MRGDOLL
COMPUTE bdy_1y_margin_doll/P11BM = ( RETAIL_COST - FUEL_CAP);
AS 'Margin $,Prior Yr.'
-IF &YEAR_COUNT GE '2' THEN GOTO P2MRGDOLL ELSE GOTO ACMRGP_STRT;
-P2MRGDOLL
COMPUTE bdy_2y_margin_doll/P11BM = ( RETAIL_COST - FUEL_CAP);
AS 'Margin $,Two Yrs Prior'
-IF &YEAR_COUNT GE '3' THEN GOTO P3MRGDOLL ELSE GOTO ACMRGP_STRT;
-P3MRGDOLL
COMPUTE bdy_3y_margin_doll/P11BM = ( RETAIL_COST - FUEL_CAP);
AS 'Margin $,Three Yrs Prior'
-IF &YEAR_COUNT GE '4' THEN GOTO P4MRGDOLL ELSE GOTO ACMRGP_STRT;
-P4MRGDOLL
COMPUTE bdy_4y_margin_doll/P11BM = ( RETAIL_COST - FUEL_CAP);
AS 'Margin $,Four Yrs Prior'
-ACMRGP_STRT
COMPUTE bdy_ty_AC_Margin_perc/D12.2B = ( (RETAIL_COST - FUEL_CAP - LENGTH) / RETAIL_COST ) * 100;
AS 'AC Margin %,This Yr.'
-IF &YEAR_COUNT GE '1' THEN GOTO P1ACMRGP ELSE GOTO ACMRGD_STRT;
-P1ACMRGP
COMPUTE bdy_1y_AC_Margin_perc/D12.2B = ( (RETAIL_COST -FUEL_CAP - LENGTH) / RETAIL_COST ) * 100;
AS 'AC Margin %,Prior Yr.'
-IF &YEAR_COUNT GE '2' THEN GOTO P2ACMRGP ELSE GOTO ACMRGD_STRT;
-P2ACMRGP
COMPUTE bdy_2y_AC_Margin_perc/D12.2B = ( (RETAIL_COST - FUEL_CAP - LENGTH) / RETAIL_COST ) * 100;
AS 'AC Margin %,Two Yrs Prior'
-IF &YEAR_COUNT GE '3' THEN GOTO P3ACMRGP ELSE GOTO ACMRGD_STRT;
-P3ACMRGP
COMPUTE bdy_3y_AC_Margin_perc/D12.2B = ( (RETAIL_COST - FUEL_CAP - LENGTH) /RETAIL_COST ) * 100;
AS 'AC Margin %,Three Yrs Prior'
-IF &YEAR_COUNT GE '4' THEN GOTO P4ACMRGP ELSE GOTO ACMRGD_STRT;
-P4ACMRGP
COMPUTE bdy_4y_AC_Margin_perc/D12.2B = ( (RETAIL_COST - FUEL_CAP - LENGTH) / RETAIL_COST ) * 100;
AS 'AC Margin %,Four Yrs Prior'
-ACMRGD_STRT
COMPUTE bdy_ty_AC_Margin_doll/P11BM = ( RETAIL_COST - FUEL_CAP - LENGTH);
AS 'AC Margin $,This Yr.'
-IF &YEAR_COUNT GE '1' THEN GOTO P1ACMRGD ELSE GOTO ADD_GROUPBY;
-P1ACMRGD
COMPUTE bdy_ty_AC_Margin_doll/P11BM = ( RETAIL_COST - FUEL_CAP - LENGTH);
AS 'AC Margin $,Prior Yr.'
-IF &YEAR_COUNT GE '2' THEN GOTO P2ACMRGD ELSE GOTO ADD_GROUPBY;
-P2ACMRGD
COMPUTE bdy_ty_AC_Margin_doll/P11BM = ( RETAIL_COST - FUEL_CAP - LENGTH);
AS 'AC Margin $,Two Yrs Prior'
-IF &YEAR_COUNT GE '3' THEN GOTO P3ACMRGD ELSE GOTO ADD_GROUPBY;
-P3ACMRGD
COMPUTE bdy_ty_AC_Margin_doll/P11BM = ( RETAIL_COST - FUEL_CAP - LENGTH);
AS 'AC Margin $,Three Yrs Prior'
-IF &YEAR_COUNT GE '4' THEN GOTO P4ACMRGD ELSE GOTO ADD_GROUPBY;
-P4ACMRGD
COMPUTE bdy_ty_AC_Margin_doll/P11BM = ( RETAIL_COST - FUEL_CAP - LENGTH);
AS 'AC Margin $,Four Yrs Prior'
-GOTO ADD_GROUPBY;
-* // END !TODO! ADD IF FOR THE COMBINED/SALES/RETURNS HERE...CHANGE THE COLUMN NAMES
-* //*********************************************************************************//
-* // STEP 1.1A GOTO - PICKS THE GROUP BY OPERATION BASED ON CONCATENATION //
-* // OF THE WORD 'FAST' WITH THE REP_PARM INPUT //
-* //*********************************************************************************//
-ADD_GROUPBY
-*MAX.FACILITY_CODE NOPRINT
-*MAX.STORE_BUDGETED_NUMBER NOPRINT
-*MAX.PL_NUMBER NOPRINT
-*MAX.SALES_ACCT_CODE NOPRINT
-*MAX.CUST_CLASS_CODE NOPRINT
-*MAX.DETAIL_CUST_NUMBER NOPRINT
-*MAX.GROUP_NUMBER NOPRINT
-*MAX.SUBGROUP_NUM NOPRINT
-*MAX.ITEM_NUM NOPRINT
-*MIN.YEARMONTH NOPRINT
-*MAX.YEARMONTH NOPRINT
-IF &CHR EQ 'BYMONTH' THEN GOTO BS_BYMONTH ELSE GOTO MY_ONE;
-BS_BYMONTH
BY HIGHEST MODEL AS 'Month'
-GOTO LOCALE;
-MY_ONE
-IF &CHR EQ 'BYYEAR' THEN GOTO BS_BYYEAR ELSE GOTO LOCALE;
-BS_BYYEAR
BY HIGHEST BODYTYPE AS 'Year'
-GOTO LOCALE;
-LOCALE
-IF &LOC EQ 'IGGY' THEN GOTO NOW_ATTRIB ELSE GOTO &LOC;
-* STEP 1.2A - RUN THE GROUP BY OPERATION
-STR
BY BODYTYPE AS 'Store'
-GOTO NOW_ATTRIB;
-DIVSTR
BY MODEL AS 'Div'
BY BODYTYPETYPE AS 'Store'
-GOTO NOW_ATTRIB;
-STRDIV
BY BODYTYPE AS 'Store'
BY MODEL AS 'Div'
-GOTO NOW_ATTRIB;
-DIV
BY MODEL AS 'Div'
-GOTO NOW_ATTRIB;
-* STEP 1.2B - RUN THE GROUP BY OPERATION
-* THESE NEXT TWO GROUPS ARE ADDED BASED ON SELECT1 FROM HTML FORM.
-* THE IDEA IS TO SEPERATE THE GROUP BY'S
-* ONE FOR MONTH/ FACILIY/ STORE/ FACILITYSTORE
-* SECOND FOR ALL OTHER DETAIL STUFF LIKE CUSTOMER INFO
-NOW_ATTRIB
-IF &TRIB EQ 'IGGY' THEN GOTO NOW_STYLE ELSE GOTO &TRIB;
-CL
BY CUST_CLASS AS 'Cust,Class'
-GOTO NOW_STYLE;
-CLPL
BY CUST_CLASS AS 'Cust,Class'
BY PL_NUMBER AS 'PL'
BY PL_DESCRIPTION AS 'PL Desc'
-GOTO NOW_STYLE;
-CUST
BY DETAIL_CUST_NAME AS 'Customer Name'
BY DETAIL_CUST_NUMBER AS 'Cust,Num'
-GOTO NOW_STYLE;
-CUSTPL
BY DETAIL_CUST_NUMBER AS 'Cust,Num'
BY CUST_CLASS AS 'Cust,Class'
BY PL_NUMBER AS 'PL'
BY PL_DESCRIPTION AS 'PL Desc'
-GOTO NOW_STYLE;
-SACT
BY SALES_ACCT_CODE AS 'SAC'
BY SALES_ACCT AS 'Sales,Acct'
-GOTO NOW_STYLE;
-SACTPL
BY SALES_ACCT_CODE AS 'SAC'
BY PL_NUMBER AS 'PL'
BY PL_DESCRIPTION AS 'PL Desc'
-GOTO NOW_STYLE;
-SACTCUST
BY SALES_ACCT_CODE AS 'SAC'
BY DETAIL_CUST_NUMBER AS 'Cust,Num'
BY DETAIL_CUST_NAME AS 'Customer Name'
-GOTO NOW_STYLE;
-PL
BY PL_NUMBER AS 'PL'
BY PL_DESCRIPTION AS 'PL Desc'
-GOTO NOW_STYLE;
-PLCUST
BY PL_NUMBER AS 'PL'
BY PL_DESCRIPTION AS 'PL Desc'
BY DETAIL_CUST_NUMBER AS 'Cust,Num'
BY DETAIL_CUST_NAME AS 'Customer Name'
-GOTO NOW_STYLE;
-PLCL
BY PL_NUMBER AS 'PL'
BY PL_DESCRIPTION AS 'PL Desc'
BY CUST_CLASS_CODE AS 'Class,Code'
BY CUST_CLASS AS 'Cust,Class
-GOTO NOW_STYLE;
-PLSACT
BY PL_NUMBER AS 'PL'
BY PL_DESCRIPTION AS 'PL Description'
BY SALES_ACCT_CODE AS 'SAC'
-GOTO NOW_STYLE;
-GR
BY GROUP_NUMBER AS 'Grp'
BY GROUP AS 'Group'
-GOTO NOW_STYLE;
-SG
BY SUBGROUP_NUM AS 'SGrp'
BY SUBGROUP AS 'Subgroup'
-GOTO NOW_STYLE;
-ITEM
BY ITEM_NUM AS 'Item'
BY ITEM_DESCRIPTION AS 'Item,Description'
-GOTO NOW_STYLE;
-NOW_STYLE
HEADING
"Matrix Report &TIT_DIV &TIT_STORE &TIT_CUST_CL &TIT_CUST_NUM &TIT_PL_NUM &TIT_SALES_ACCT &TIT_GROUP_NUM &TIT_SUB_GRP &TIT_ITEM_NUM"
"&TIT_BEGIN_MONTH &TIT_END_MONTH"
"&STRTRAIL_D"
-* WHERE YEARMONTH GE &BEGIN_MONTH;
-* WHERE YEARMONTH LE &END_MONTH;
-* WHERE FACILITY_CODE EQ &FACILITY_CODE1;
-* WHERE STORE_BUDGETED_NUMBER EQ &STORE_CODE1;
-* WHERE DETAIL_CUST_NUMBER EQ &CUST_NUMBER1;
-* WHERE PL_NUMBER EQ &PL_NUMBER1;
-* WHERE GROUP_NUMBER EQ &GROUP_NUMBER1;
-*-* WHERE SUBGROUP_NUM EQ &SUB_GROUP_NUMBER1;
-* WHERE CUST_CLASS_CODE EQ &CUST_CLASS_CODE1;
-* WHERE ITEM_NUM EQ &ITEM_NUMBER1;
-IF &RETURN_EFFECT EQ 'S' THEN GOTO SALES_ONLY ELSE GOTO BS_RETONLY;
-SALES_ONLY
-* WHERE ORDER_CLASS NE 'R';
-GOTO NOW_PRORATE
-BS_RETONLY
-IF &RETURN_EFFECT EQ 'R' THEN GOTO RET_ONLY ELSE GOTO NOW_PRORATE;
-RET_ONLY
-* WHERE ORDER_CLASS EQ 'R';
-GOTO NOW_PRORATE
-NOW_PRORATE
-IF &MTD_PRORATE EQ 'True' THEN GOTO MTD_ALL ELSE GOTO MTD_SINGLE;
-MTD_ALL
-* WHERE ( MTD_FLAG LE 50 );
-GOTO NOW_STYLE2
-MTD_SINGLE
-* WHERE ( MTD_FLAG EQ 50 ) OR ( MTD_FLAG EQ 55 );
-GOTO NOW_STYLE2
-NOW_STYLE2
-IF &USE_VIEWER EQ 'True' THEN GOTO USE_VIEWER ELSE GOTO NOW_STYLE3;
-USE_VIEWER
ON TABLE SET WEBVIEWER ON
-NOW_STYLE3
ON TABLE SET PAGE-NUM OFF
ON TABLE SET BYDISPLAY ON
-*ON TABLE NOTOTAL
ON TABLE COLUMN-TOTAL AS 'TOTAL'
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET OLAPPANE HIDDEN
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
WRAP=OFF,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=9,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
$
TYPE=DATA,COLUMN=N1,
-* -GOTO &LOC_DEST;
-* -LOC_IGGY
-IF &STRTRAIL OMITS 'DIV' THEN GOTO ASTART ELSE GOTO AEND;
-ASTART
DRILLMENUITEM='Show by Division',
FOCEXEC=app/wcqrgj18.fex( \
BEGIN_MONTH =MIN.YEARMONTH \
END_MONTH =MAX.YEARMONTH \
CHR = '&CHR' \
LOC = 'DIV' \
TRIB = '&TRIB' \
-IF &STRTRAIL OMITS 'DIV' THEN GOTO ADIV1 ELSE GOTO ADIV2;
-ADIV1
FACILITY_CODE = '&FACILITY_CODE' \
-GOTO ADIVE
-ADIV2
FACILITY_CODE = MAX.FACILITY_CODE \
-ADIVE
-IF &STRTRAIL OMITS 'STR' THEN GOTO ASTR1 ELSE GOTO ASTR2;
-ASTR1
STORE_CODE = '&STORE_CODE' \
-GOTO ASTRE
-ASTR2
STORE_CODE = MAX.STORE_BUDGETED_NUMBER \
-ASTRE
-IF &STRTRAIL OMITS 'CL' THEN GOTO ACL1 ELSE GOTO ACL2;
-ACL1
CUST_CLASS_CODE = '&CUST_CLASS_CODE' \
-GOTO ACLE
-ACL2
CUST_CLASS_CODE = MAX.CUST_CLASS_CODE \
-ACLE
-IF &STRTRAIL OMITS 'CUST' THEN GOTO ACUST1 ELSE GOTO ACUST2;
-ACUST1
CUST_NUMBER = '&CUST_NUMBER' \
-GOTO ACUSTE
-ACUST2
CUST_NUMBER = MAX.DETAIL_CUST_NUMBER \
-ACUSTE
-IF &STRTRAIL OMITS 'PL' THEN GOTO APL1 ELSE GOTO APL2;
-APL1
PL_NUMBER = '&PL_NUMBER' \
-GOTO APLE
-APL2
PL_NUMBER = MAX.PL_NUMBER \
-APLE
-IF &STRTRAIL OMITS 'SACT' THEN GOTO ASACT1 ELSE GOTO ASACT2;
-ASACT1
SALES_ACCT_CODE = '&SALES_ACCT_CODE' \
-GOTO ASACTE
-ASACT2
SALES_ACCT_CODE = MAX.SALES_ACCT_CODE \
-ASACTE
-IF &STRTRAIL OMITS 'GR' THEN GOTO AGR1 ELSE GOTO AGR2;
-AGR1
GROUP_NUMBER = '&GROUP_NUMBER' \
-GOTO AGRE
-AGR2
GROUP_NUMBER = MAX.GROUP_NUMBER \
-AGRE
-IF &STRTRAIL OMITS 'SG' THEN GOTO ASG1 ELSE GOTO ASG2;
-ASG1
SUB_GROUP_NUMBER = '&SUB_GROUP_NUMBER' \
-GOTO ASGE
-ASG2
SUB_GROUP_NUMBER = MAX.SUBGROUP_NUM \
-ASGE
-IF &STRTRAIL OMITS 'ITEM' THEN GOTO AITEM1 ELSE GOTO AITEM2;
-AITEM1
ITEM_NUMBER = '&ITEM_NUMBER' \
-GOTO AITEME
-AITEM2
ITEM_NUMBER = MAX.ITEM_NUMBER \
-AITEME
RETURN_EFFECT ='&RETURN_EFFECT' \
SBGT ='&SBGT' \
YEAR_COUNT ='&YEAR_COUNT' \
MTD_PRORATE ='&MTD_PRORATE' \
USE_VIEWER ='&USE_VIEWER' \
STRTRAIL ='&STRTRAIL' \
),TARGET=_self,
-AEND
-IF &STRTRAIL OMITS 'STR' THEN GOTO BSTART ELSE GOTO BEND;
-BSTART
DRILLMENUITEM='Show by Store',
FOCEXEC=app/wcqrgj18.fex( \
BEGIN_MONTH =MIN.YEARMONTH \
END_MONTH =MAX.YEARMONTH \
CHR = '&CHR' \
LOC = 'STR' \
TRIB = '&TRIB' \
-IF &STRTRAIL OMITS 'DIV' THEN GOTO BDIV1 ELSE GOTO BDIV2;
-BDIV1
FACILITY_CODE = '&FACILITY_CODE' \
-GOTO BDIVE
-BDIV2
FACILITY_CODE = MAX.FACILITY_CODE \
-BDIVE
-IF &STRTRAIL OMITS 'STR' THEN GOTO BSTR1 ELSE GOTO BSTR2;
-BSTR1
STORE_CODE = '&STORE_CODE' \
-GOTO BSTRE
-BSTR2
STORE_CODE = MAX.STORE_BUDGETED_NUMBER \
-BSTRE
-IF &STRTRAIL OMITS 'CL' THEN GOTO BCL1 ELSE GOTO BCL2;
-BCL1
CUST_CLASS_CODE = '&CUST_CLASS_CODE' \
-GOTO BCLE
-BCL2
CUST_CLASS_CODE = MAX.CUST_CLASS_CODE \
-BCLE
-IF &STRTRAIL OMITS 'CUST' THEN GOTO BCUST1 ELSE GOTO BCUST2;
-BCUST1
CUST_NUMBER = '&CUST_NUMBER' \
-GOTO BCUSTE
-BCUST2
CUST_NUMBER = MAX.DETAIL_CUST_NUMBER \
-BCUSTE
-IF &STRTRAIL OMITS 'PL' THEN GOTO BPL1 ELSE GOTO BPL2;
-BPL1
PL_NUMBER = '&PL_NUMBER' \
-GOTO BPLE
-BPL2
PL_NUMBER = MAX.PL_NUMBER \
-BPLE
-IF &STRTRAIL OMITS 'SACT' THEN GOTO BSACT1 ELSE GOTO BSACT2;
-BSACT1
SALES_ACCT_CODE = '&SALES_ACCT_CODE' \
-GOTO BSACTE
-BSACT2
SALES_ACCT_CODE = MAX.SALES_ACCT_CODE \
-BSACTE
-IF &STRTRAIL OMITS 'GR' THEN GOTO BGR1 ELSE GOTO BGR2;
-BGR1
GROUP_NUMBER = '&GROUP_NUMBER' \
-GOTO BGRE
-BGR2
GROUP_NUMBER = MAX.GROUP_NUMBER \
-BGRE
-IF &STRTRAIL OMITS 'SG' THEN GOTO BSG1 ELSE GOTO BSG2;
-BSG1
SUB_GROUP_NUMBER = '&SUB_GROUP_NUMBER' \
-GOTO BSGE
-BSG2
SUB_GROUP_NUMBER = MAX.SUBGROUP_NUM \
-BSGE
-IF &STRTRAIL OMITS 'ITEM' THEN GOTO BITEM1 ELSE GOTO BITEM2;
-BITEM1
ITEM_NUMBER = '&ITEM_NUMBER' \
-GOTO BITEME
-BITEM2
ITEM_NUMBER = MAX.ITEM_NUMBER \
-BITEME
RETURN_EFFECT ='&RETURN_EFFECT' \
SBGT ='&SBGT' \
YEAR_COUNT ='&YEAR_COUNT' \
MTD_PRORATE ='&MTD_PRORATE' \
USE_VIEWER ='&USE_VIEWER' \
STRTRAIL ='&STRTRAIL' \
),TARGET=_self,
-BEND
-IF &STRTRAIL OMITS 'CL' THEN GOTO CSTART ELSE GOTO CEND;
-CSTART
DRILLMENUITEM='Show By Customer Class',
FOCEXEC=app/wcqrgj18.fex( \
BEGIN_MONTH =MIN.YEARMONTH \
END_MONTH =MAX.YEARMONTH \
CHR = '&CHR' \
LOC = '&LOC' \
TRIB = 'CL' \
-IF &STRTRAIL OMITS 'DIV' THEN GOTO CDIV1 ELSE GOTO CDIV2;
-CDIV1
FACILITY_CODE = '&FACILITY_CODE' \
-GOTO CDIVE
-CDIV2
FACILITY_CODE = MAX.FACILITY_CODE \
-CDIVE
-IF &STRTRAIL OMITS 'STR' THEN GOTO CSTR1 ELSE GOTO CSTR2;
-CSTR1
STORE_CODE = '&STORE_CODE' \
-GOTO CSTRE
-CSTR2
STORE_CODE = MAX.STORE_BUDGETED_NUMBER \
-CSTRE
-IF &STRTRAIL OMITS 'CL' THEN GOTO CCL1 ELSE GOTO CCL2;
-CCL1
CUST_CLASS_CODE = '&CUST_CLASS_CODE' \
-GOTO CCLE
-CCL2
CUST_CLASS_CODE = MAX.CUST_CLASS_CODE \
-CCLE
-IF &STRTRAIL OMITS 'CUST' THEN GOTO CCUST1 ELSE GOTO CCUST2;
-CCUST1
CUST_NUMBER = '&CUST_NUMBER' \
-GOTO CCUSTE
-CCUST2
CUST_NUMBER = MAX.DETAIL_CUST_NUMBER \
-CCUSTE
-IF &STRTRAIL OMITS 'PL' THEN GOTO CPL1 ELSE GOTO CPL2;
-CPL1
PL_NUMBER = '&PL_NUMBER' \
-GOTO CPLE
-CPL2
PL_NUMBER = MAX.PL_NUMBER \
-CPLE
-IF &STRTRAIL OMITS 'SACT' THEN GOTO CSACT1 ELSE GOTO CSACT2;
-CSACT1
SALES_ACCT_CODE = '&SALES_ACCT_CODE' \
-GOTO CSACTE
-CSACT2
SALES_ACCT_CODE = MAX.SALES_ACCT_CODE \
-CSACTE
-IF &STRTRAIL OMITS 'GR' THEN GOTO CGR1 ELSE GOTO CGR2;
-CGR1
GROUP_NUMBER = '&GROUP_NUMBER' \
-GOTO CGRE
-CGR2
GROUP_NUMBER = MAX.GROUP_NUMBER \
-CGRE
-IF &STRTRAIL OMITS 'SG' THEN GOTO CSG1 ELSE GOTO CSG2;
-CSG1
SUB_GROUP_NUMBER = '&SUB_GROUP_NUMBER' \
-GOTO CSGE
-CSG2
SUB_GROUP_NUMBER = MAX.SUBGROUP_NUM \
-CSGE
-IF &STRTRAIL OMITS 'ITEM' THEN GOTO CITEM1 ELSE GOTO CITEM2;
-CITEM1
ITEM_NUMBER = '&ITEM_NUMBER' \
-GOTO CITEME
-CITEM2
ITEM_NUMBER = MAX.ITEM_NUMBER \
-CITEME
RETURN_EFFECT ='&RETURN_EFFECT' \
SBGT ='&SBGT' \
YEAR_COUNT ='&YEAR_COUNT' \
MTD_PRORATE ='&MTD_PRORATE' \
USE_VIEWER ='&USE_VIEWER' \
STRTRAIL ='&STRTRAIL' \
),TARGET=_self,
-CEND
-IF &STRTRAIL OMITS 'PL' THEN GOTO DSTART ELSE GOTO DEND;
-DSTART
DRILLMENUITEM='Show By Product Line',
FOCEXEC=app/wcqrgj18.fex( \
BEGIN_MONTH =MIN.YEARMONTH \
END_MONTH =MAX.YEARMONTH \
CHR = '&CHR' \
LOC = '&LOC' \
TRIB = 'PL' \
-IF &STRTRAIL OMITS 'DIV' THEN GOTO DDIV1 ELSE GOTO DDIV2;
-DDIV1
FACILITY_CODE = '&FACILITY_CODE' \
-GOTO DDIVE
-DDIV2
FACILITY_CODE = MAX.FACILITY_CODE \
-DDIVE
-IF &STRTRAIL OMITS 'STR' THEN GOTO DSTR1 ELSE GOTO DSTR2;
-DSTR1
STORE_CODE = '&STORE_CODE' \
-GOTO DSTRE
-DSTR2
STORE_CODE = MAX.STORE_BUDGETED_NUMBER \
-DSTRE
-IF &STRTRAIL OMITS 'CL' THEN GOTO DCL1 ELSE GOTO DCL2;
-DCL1
CUST_CLASS_CODE = '&CUST_CLASS_CODE' \
-GOTO DCLE
-DCL2
CUST_CLASS_CODE = MAX.CUST_CLASS_CODE \
-DCLE
-IF &STRTRAIL OMITS 'CUST' THEN GOTO DCUST1 ELSE GOTO DCUST2;
-DCUST1
CUST_NUMBER = '&CUST_NUMBER' \
-GOTO DCUSTE
-DCUST2
CUST_NUMBER = MAX.DETAIL_CUST_NUMBER \
-DCUSTE
-IF &STRTRAIL OMITS 'PL' THEN GOTO DPL1 ELSE GOTO DPL2;
-DPL1
PL_NUMBER = '&PL_NUMBER' \
-GOTO DPLE
-DPL2
PL_NUMBER = MAX.PL_NUMBER \
-DPLE
-IF &STRTRAIL OMITS 'SACT' THEN GOTO DSACT1 ELSE GOTO DSACT2;
-DSACT1
SALES_ACCT_CODE = '&SALES_ACCT_CODE' \
-GOTO DSACTE
-DSACT2
SALES_ACCT_CODE = MAX.SALES_ACCT_CODE \
-DSACTE
-IF &STRTRAIL OMITS 'GR' THEN GOTO DGR1 ELSE GOTO DGR2;
-DGR1
GROUP_NUMBER = '&GROUP_NUMBER' \
-GOTO DGRE
-DGR2
GROUP_NUMBER = MAX.GROUP_NUMBER \
-DGRE
-IF &STRTRAIL OMITS 'SG' THEN GOTO DSG1 ELSE GOTO DSG2;
-DSG1
SUB_GROUP_NUMBER = '&SUB_GROUP_NUMBER' \
-GOTO DSGE
-DSG2
SUB_GROUP_NUMBER = MAX.SUBGROUP_NUM \
-DSGE
-IF &STRTRAIL OMITS 'ITEM' THEN GOTO DITEM1 ELSE GOTO DITEM2;
-DITEM1
ITEM_NUMBER = '&ITEM_NUMBER' \
-GOTO DITEME
-DITEM2
ITEM_NUMBER = MAX.ITEM_NUMBER \
-DITEME
RETURN_EFFECT ='&RETURN_EFFECT' \
SBGT ='&SBGT' \
YEAR_COUNT ='&YEAR_COUNT' \
MTD_PRORATE ='&MTD_PRORATE' \
USE_VIEWER ='&USE_VIEWER' \
STRTRAIL ='&STRTRAIL' \
),TARGET=_self,
-DEND
-IF &STRTRAIL OMITS 'GR' THEN GOTO ESTART ELSE GOTO EEND;
-ESTART
DRILLMENUITEM='Show By Group',
FOCEXEC=app/wcqrgj18.fex( \
BEGIN_MONTH =MIN.YEARMONTH \
END_MONTH =MAX.YEARMONTH \
CHR = '&CHR' \
LOC = '&LOC' \
TRIB = 'GR' \
-IF &STRTRAIL OMITS 'DIV' THEN GOTO EDIV1 ELSE GOTO EDIV2;
-EDIV1
FACILITY_CODE = '&FACILITY_CODE' \
-GOTO EDIVE
-EDIV2
FACILITY_CODE = MAX.FACILITY_CODE \
-EDIVE
-IF &STRTRAIL OMITS 'STR' THEN GOTO ESTR1 ELSE GOTO ESTR2;
-ESTR1
STORE_CODE = '&STORE_CODE' \
-GOTO ESTRE
-ESTR2
STORE_CODE = MAX.STORE_BUDGETED_NUMBER \
-ESTRE
-IF &STRTRAIL OMITS 'CL' THEN GOTO ECL1 ELSE GOTO ECL2;
-ECL1
CUST_CLASS_CODE = '&CUST_CLASS_CODE' \
-GOTO ECLE
-ECL2
CUST_CLASS_CODE = MAX.CUST_CLASS_CODE \
-ECLE
-IF &STRTRAIL OMITS 'CUST' THEN GOTO ECUST1 ELSE GOTO ECUST2;
-ECUST1
CUST_NUMBER = '&CUST_NUMBER' \
-GOTO ECUSTE
-ECUST2
CUST_NUMBER = MAX.DETAIL_CUST_NUMBER \
-ECUSTE
-IF &STRTRAIL OMITS 'PL' THEN GOTO EPL1 ELSE GOTO EPL2;
-EPL1
PL_NUMBER = '&PL_NUMBER' \
-GOTO EPLE
-EPL2
PL_NUMBER = MAX.PL_NUMBER \
-EPLE
-IF &STRTRAIL OMITS 'SACT' THEN GOTO ESACT1 ELSE GOTO ESACT2;
-ESACT1
SALES_ACCT_CODE = '&SALES_ACCT_CODE' \
-GOTO ESACTE
-ESACT2
SALES_ACCT_CODE = MAX.SALES_ACCT_CODE \
-ESACTE
-IF &STRTRAIL OMITS 'GR' THEN GOTO EGR1 ELSE GOTO EGR2;
-EGR1
GROUP_NUMBER = '&GROUP_NUMBER' \
-GOTO EGRE
-EGR2
GROUP_NUMBER = MAX.GROUP_NUMBER \
-EGRE
-IF &STRTRAIL OMITS 'SG' THEN GOTO ESG1 ELSE GOTO ESG2;
-ESG1
SUB_GROUP_NUMBER = '&SUB_GROUP_NUMBER' \
-GOTO ESGE
-ESG2
SUB_GROUP_NUMBER = MAX.SUBGROUP_NUM \
-ESGE
-IF &STRTRAIL OMITS 'ITEM' THEN GOTO EITEM1 ELSE GOTO EITEM2;
-EITEM1
ITEM_NUMBER = '&ITEM_NUMBER' \
-GOTO EITEME
-EITEM2
ITEM_NUMBER = MAX.ITEM_NUMBER \
-EITEME
RETURN_EFFECT ='&RETURN_EFFECT' \
SBGT ='&SBGT' \
YEAR_COUNT ='&YEAR_COUNT' \
MTD_PRORATE ='&MTD_PRORATE' \
USE_VIEWER ='&USE_VIEWER' \
STRTRAIL ='&STRTRAIL' \
),TARGET=_self,
-EEND
-IF &STRTRAIL OMITS 'SG' THEN GOTO FSTART ELSE GOTO FEND;
-FSTART
DRILLMENUITEM='Show By SubGroup',
FOCEXEC=app/wcqrgj18.fex( \
BEGIN_MONTH =MIN.YEARMONTH \
END_MONTH =MAX.YEARMONTH \
CHR = '&CHR' \
LOC = '&LOC' \
TRIB = 'SG' \
-IF &STRTRAIL OMITS 'DIV' THEN GOTO FDIV1 ELSE GOTO FDIV2;
-FDIV1
FACILITY_CODE = '&FACILITY_CODE' \
-GOTO FDIVE
-FDIV2
FACILITY_CODE = MAX.FACILITY_CODE \
-FDIVE
-IF &STRTRAIL OMITS 'STR' THEN GOTO FSTR1 ELSE GOTO FSTR2;
-FSTR1
STORE_CODE = '&STORE_CODE' \
-GOTO FSTRE
-FSTR2
STORE_CODE = MAX.STORE_BUDGETED_NUMBER \
-FSTRE
-IF &STRTRAIL OMITS 'CL' THEN GOTO FCL1 ELSE GOTO FCL2;
-FCL1
CUST_CLASS_CODE = '&CUST_CLASS_CODE' \
-GOTO FCLE
-FCL2
CUST_CLASS_CODE = MAX.CUST_CLASS_CODE \
-FCLE
-IF &STRTRAIL OMITS 'CUST' THEN GOTO FCUST1 ELSE GOTO FCUST2;
-FCUST1
CUST_NUMBER = '&CUST_NUMBER' \
-GOTO FCUSTE
-FCUST2
CUST_NUMBER = MAX.DETAIL_CUST_NUMBER \
-FCUSTE
-IF &STRTRAIL OMITS 'PL' THEN GOTO FPL1 ELSE GOTO FPL2;
-FPL1
PL_NUMBER = '&PL_NUMBER' \
-GOTO FPLE
-FPL2
PL_NUMBER = MAX.PL_NUMBER \
-FPLE
-IF &STRTRAIL OMITS 'SACT' THEN GOTO FSACT1 ELSE GOTO FSACT2;
-FSACT1
SALES_ACCT_CODE = '&SALES_ACCT_CODE' \
-GOTO FSACTE
-FSACT2
SALES_ACCT_CODE = MAX.SALES_ACCT_CODE \
-FSACTE
-IF &STRTRAIL OMITS 'GR' THEN GOTO FGR1 ELSE GOTO FGR2;
-FGR1
GROUP_NUMBER = '&GROUP_NUMBER' \
-GOTO FGRE
-FGR2
GROUP_NUMBER = MAX.GROUP_NUMBER \
-FGRE
-IF &STRTRAIL OMITS 'SG' THEN GOTO FSG1 ELSE GOTO FSG2;
-FSG1
SUB_GROUP_NUMBER = '&SUB_GROUP_NUMBER' \
-GOTO FSGE
-FSG2
SUB_GROUP_NUMBER = MAX.SUBGROUP_NUM \
-FSGE
-IF &STRTRAIL OMITS 'ITEM' THEN GOTO FITEM1 ELSE GOTO FITEM2;
-FITEM1
ITEM_NUMBER = '&ITEM_NUMBER' \
-GOTO FITEME
-FITEM2
ITEM_NUMBER = MAX.ITEM_NUMBER \
-FITEME
RETURN_EFFECT ='&RETURN_EFFECT' \
SBGT ='&SBGT' \
YEAR_COUNT ='&YEAR_COUNT' \
MTD_PRORATE ='&MTD_PRORATE' \
USE_VIEWER ='&USE_VIEWER' \
STRTRAIL ='&STRTRAIL' \
),TARGET=_self,
-FEND
-IF &STRTRAIL OMITS 'SACT' THEN GOTO GSTART ELSE GOTO GEND;
-GSTART
DRILLMENUITEM='Show By Sales Acct Code',
FOCEXEC=app/wcqrgj18.fex( \
BEGIN_MONTH =MIN.YEARMONTH \
END_MONTH =MAX.YEARMONTH \
CHR = '&CHR' \
LOC = '&LOC' \
TRIB = 'SACT' \
-IF &STRTRAIL OMITS 'DIV' THEN GOTO GDIV1 ELSE GOTO GDIV2;
-GDIV1
FACILITY_CODE = '&FACILITY_CODE' \
-GOTO GDIVE
-GDIV2
FACILITY_CODE = MAX.FACILITY_CODE \
-GDIVE
-IF &STRTRAIL OMITS 'STR' THEN GOTO GSTR1 ELSE GOTO GSTR2;
-GSTR1
STORE_CODE = '&STORE_CODE' \
-GOTO GSTRE
-GSTR2
STORE_CODE = MAX.STORE_BUDGETED_NUMBER \
-GSTRE
-IF &STRTRAIL OMITS 'CL' THEN GOTO GCL1 ELSE GOTO GCL2;
-GCL1
CUST_CLASS_CODE = '&CUST_CLASS_CODE' \
-GOTO GCLE
-GCL2
CUST_CLASS_CODE = MAX.CUST_CLASS_CODE \
-GCLE
-IF &STRTRAIL OMITS 'CUST' THEN GOTO GCUST1 ELSE GOTO GCUST2;
-GCUST1
CUST_NUMBER = '&CUST_NUMBER' \
-GOTO GCUSTE
-GCUST2
CUST_NUMBER = MAX.DETAIL_CUST_NUMBER \
-GCUSTE
-IF &STRTRAIL OMITS 'PL' THEN GOTO GPL1 ELSE GOTO GPL2;
-GPL1
PL_NUMBER = '&PL_NUMBER' \
-GOTO GPLE
-GPL2
PL_NUMBER = MAX.PL_NUMBER \
-GPLE
-IF &STRTRAIL OMITS 'SACT' THEN GOTO GSACT1 ELSE GOTO GSACT2;
-GSACT1
SALES_ACCT_CODE = '&SALES_ACCT_CODE' \
-GOTO GSACTE
-GSACT2
SALES_ACCT_CODE = MAX.SALES_ACCT_CODE \
-GSACTE
-IF &STRTRAIL OMITS 'GR' THEN GOTO GGR1 ELSE GOTO GGR2;
-GGR1
GROUP_NUMBER = '&GROUP_NUMBER' \
-GOTO GGRE
-GGR2
GROUP_NUMBER = MAX.GROUP_NUMBER \
-GGRE
-IF &STRTRAIL OMITS 'SG' THEN GOTO GSG1 ELSE GOTO GSG2;
-GSG1
SUB_GROUP_NUMBER = '&SUB_GROUP_NUMBER' \
-GOTO GSGE
-GSG2
SUB_GROUP_NUMBER = MAX.SUBGROUP_NUM \
-GSGE
-IF &STRTRAIL OMITS 'ITEM' THEN GOTO GITEM1 ELSE GOTO GITEM2;
-GITEM1
ITEM_NUMBER = '&ITEM_NUMBER' \
-GOTO GITEME
-GITEM2
ITEM_NUMBER = MAX.ITEM_NUMBER \
-GITEME
RETURN_EFFECT ='&RETURN_EFFECT' \
SBGT ='&SBGT' \
YEAR_COUNT ='&YEAR_COUNT' \
MTD_PRORATE ='&MTD_PRORATE' \
USE_VIEWER ='&USE_VIEWER' \
STRTRAIL ='&STRTRAIL' \
),TARGET=_self,
-GEND
-IF &STRTRAIL OMITS 'CUST' THEN GOTO HSTART ELSE GOTO HEND;
-HSTART
DRILLMENUITEM='Show By Customer',
FOCEXEC=app/wcqrgj18.fex( \
BEGIN_MONTH =MIN.YEARMONTH \
END_MONTH =MAX.YEARMONTH \
CHR = '&CHR' \
LOC = '&LOC' \
TRIB = 'CUST' \
-IF &STRTRAIL OMITS 'DIV' THEN GOTO HDIV1 ELSE GOTO HDIV2;
-HDIV1
FACILITY_CODE = '&FACILITY_CODE' \
-GOTO HDIVE
-HDIV2
FACILITY_CODE = MAX.FACILITY_CODE \
-HDIVE
-IF &STRTRAIL OMITS 'STR' THEN GOTO HSTR1 ELSE GOTO HSTR2;
-HSTR1
STORE_CODE = '&STORE_CODE' \
-GOTO HSTRE
-HSTR2
STORE_CODE = MAX.STORE_BUDGETED_NUMBER \
-HSTRE
-IF &STRTRAIL OMITS 'CL' THEN GOTO HCL1 ELSE GOTO HCL2;
-HCL1
CUST_CLASS_CODE = '&CUST_CLASS_CODE' \
-GOTO HCLE
-HCL2
CUST_CLASS_CODE = MAX.CUST_CLASS_CODE \
-HCLE
-IF &STRTRAIL OMITS 'CUST' THEN GOTO HCUST1 ELSE GOTO HCUST2;
-HCUST1
CUST_NUMBER = '&CUST_NUMBER' \
-GOTO HCUSTE
-HCUST2
CUST_NUMBER = MAX.DETAIL_CUST_NUMBER \
-HCUSTE
-IF &STRTRAIL OMITS 'PL' THEN GOTO HPL1 ELSE GOTO HPL2;
-HPL1
PL_NUMBER = '&PL_NUMBER' \
-GOTO HPLE
-HPL2
PL_NUMBER = MAX.PL_NUMBER \
-HPLE
-IF &STRTRAIL OMITS 'SACT' THEN GOTO HSACT1 ELSE GOTO HSACT2;
-HSACT1
SALES_ACCT_CODE = '&SALES_ACCT_CODE' \
-GOTO HSACTE
-HSACT2
SALES_ACCT_CODE = MAX.SALES_ACCT_CODE \
-HSACTE
-IF &STRTRAIL OMITS 'GR' THEN GOTO HGR1 ELSE GOTO HGR2;
-HGR1
GROUP_NUMBER = '&GROUP_NUMBER' \
-GOTO HGRE
-HGR2
GROUP_NUMBER = MAX.GROUP_NUMBER \
-HGRE
-IF &STRTRAIL OMITS 'SG' THEN GOTO HSG1 ELSE GOTO HSG2;
-HSG1
SUB_GROUP_NUMBER = '&SUB_GROUP_NUMBER' \
-GOTO HSGE
-HSG2
SUB_GROUP_NUMBER = MAX.SUBGROUP_NUM \
-HSGE
-IF &STRTRAIL OMITS 'ITEM' THEN GOTO HITEM1 ELSE GOTO HITEM2;
-HITEM1
ITEM_NUMBER = '&ITEM_NUMBER' \
-GOTO HITEME
-HITEM2
ITEM_NUMBER = MAX.ITEM_NUMBER \
-HITEME
RETURN_EFFECT ='&RETURN_EFFECT' \
SBGT ='&SBGT' \
YEAR_COUNT ='&YEAR_COUNT' \
MTD_PRORATE ='&MTD_PRORATE' \
USE_VIEWER ='&USE_VIEWER' \
STRTRAIL ='&STRTRAIL' \
),TARGET=_self,
-HEND
-IF &STRTRAIL OMITS 'ITEM' THEN GOTO JSTART ELSE GOTO JEND;
-JSTART
DRILLMENUITEM='Show By Item',
FOCEXEC=app/wcqrgj18.fex( \
BEGIN_MONTH =MIN.YEARMONTH \
END_MONTH =MAX.YEARMONTH \
CHR = '&CHR' \
LOC = '&LOC' \
TRIB = 'ITEM' \
-IF &STRTRAIL OMITS 'DIV' THEN GOTO JDIV1 ELSE GOTO JDIV2;
-JDIV1
FACILITY_CODE = '&FACILITY_CODE' \
-GOTO JDIVE
-JDIV2
FACILITY_CODE = MAX.FACILITY_CODE \
-JDIVE
-IF &STRTRAIL OMITS 'STR' THEN GOTO JSTR1 ELSE GOTO JSTR2;
-JSTR1
STORE_CODE = '&STORE_CODE' \
-GOTO JSTRE
-JSTR2
STORE_CODE = MAX.STORE_BUDGETED_NUMBER \
-JSTRE
-IF &STRTRAIL OMITS 'CL' THEN GOTO JCL1 ELSE GOTO JCL2;
-JCL1
CUST_CLASS_CODE = '&CUST_CLASS_CODE' \
-GOTO JCLE
-JCL2
CUST_CLASS_CODE = MAX.CUST_CLASS_CODE \
-JCLE
-IF &STRTRAIL OMITS 'CUST' THEN GOTO JCUST1 ELSE GOTO JCUST2;
-JCUST1
CUST_NUMBER = '&CUST_NUMBER' \
-GOTO JCUSTE
-JCUST2
CUST_NUMBER = MAX.DETAIL_CUST_NUMBER \
-JCUSTE
-IF &STRTRAIL OMITS 'PL' THEN GOTO JPL1 ELSE GOTO JPL2;
-JPL1
PL_NUMBER = '&PL_NUMBER' \
-GOTO JPLE
-JPL2
PL_NUMBER = MAX.PL_NUMBER \
-JPLE
-IF &STRTRAIL OMITS 'SACT' THEN GOTO JSACT1 ELSE GOTO JSACT2;
-JSACT1
SALES_ACCT_CODE = '&SALES_ACCT_CODE' \
-GOTO JSACTE
-JSACT2
SALES_ACCT_CODE = MAX.SALES_ACCT_CODE
Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.