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.
Hi all I am having yet another strange issue. The two sets of data are run from the same code, the only difference is the top set was taken from the full report, and the for bottom set I added a where clause for those specific records.
The issue is the large blank area in the top set of records, it should be identical to the bottom set. This Field is created by using EDIT to select only 20 chars. As you can see it doesn't seem to work properly.
what's even stranger is that some times it works.... I'll also add that this report has been running for several years with only minor changes, but no recent changes.
Here's the code I edited out a significant amount of decode logic, becuase its lengthy. ..and before any body asks, I did not write this code. I inherited it......
JOIN ADATA WITH INSEAM IN mtx_products_new TO ALL ADATA IN BL AS J
DEFINE FILE mtx_products_new
ADATA/A1 WITH INSEAM = ' ' ;
AATEMP/A2 = GETTOK(INSEAM,25,1,'|',2,AA) ;
AA/A2 = IF AATEMP EQ ' ' THEN '-' ELSE AATEMP ;
BB/A2 =GETTOK(INSEAM,25,2,'|',2,BB) ;
CC/A2 = GETTOK(INSEAM,25,3,'|',2,CC) ;
DD/A2 = GETTOK(INSEAM,25,4,'|',2,DD) ;
EE/A2 =GETTOK(INSEAM,25,5,'|',2,EE) ;
FF/A2 = GETTOK(INSEAM,25,6,'|',2,FF) ;
-*KTR/I2 = IF BB EQ ' ' THEN 1 ELSE IF CC EQ ' ' THEN 2 ELSE IF DD EQ ' ' THEN 3 ELSE IF EE EQ ' ' THEN 4 ELSE IF FF EQ ' ' THEN 5 ELSE 99 ;
XX/A2 = IF AKEY EQ '1' THEN AA ELSE IF AKEY EQ '2' THEN BB ELSE IF AKEY EQ '3' THEN CC ELSE IF AKEY EQ '4' THEN DD ELSE IF AKEY EQ '5' THEN EE ELSE ' ';
-*IF BDATA EQ '03' THEN CC ELSE IF BKEY EQ '4' THEN DD ;
LWDATE/YYMD = HDATE(LAST_MODIFIED_DATE,'YYMD');
XDIVISION/I2 = DECODE DIVISION
(M 20 C 10 T 10 P 23 W 24 L 26 Q 26 K 15 J 25) ;
XSEASON/A3 = IF DELIVERY_PERIOD_CODE EQ '09' THEN 'B99' ELSE SEASON ;
PACKHANG/A1 = IF PACK_METHOD EQ 'H' THEN 'H' ELSE 'P';
ZZ/A25 = STRIP(25, PRODUCT_TYPE, ' ', 'A25');
YY/A40 = EDIT(XDIVISION) || ZZ ;
PROD_DESCR/A20 = UPCASE(20, EDIT(STYLE_DESC, '99999999999999999999$$$$$'), 'A20');
RLMSEASON/A3 = IF XSEASON EQ 'S9' THEN 'S09' ELSE
IF XSEASON EQ 'U9' THEN 'U09' ELSE
IF XSEASON EQ 'F9' THEN 'F09' ELSE
IF XSEASON EQ 'H9' THEN 'H09' ELSE
IF XSEASON EQ 'R9' THEN 'R09' ELSE
IF XSEASON EQ 'S0' THEN 'S10' ELSE
IF XSEASON EQ 'U0' THEN 'U10' ELSE
IF XSEASON EQ 'F0' THEN 'F10' ELSE
IF XSEASON EQ 'H0' THEN 'H10' ELSE
IF XSEASON EQ 'R0' THEN 'R10' ELSE
IF XSEASON EQ 'S1' THEN 'S11' ELSE
IF XSEASON EQ 'U1' THEN 'U11' ELSE
IF XSEASON EQ 'F1' THEN 'F11' ELSE
IF XSEASON EQ 'H1' THEN 'H11' ELSE
IF XSEASON EQ 'R1' THEN 'R11' ELSE
IF XSEASON EQ 'S2' THEN 'S12' ELSE
IF XSEASON EQ 'U2' THEN 'U12' ELSE
IF XSEASON EQ 'F2' THEN 'F12' ELSE
IF XSEASON EQ 'H2' THEN 'H12' ELSE
IF XSEASON EQ 'R2' THEN 'R12' ELSE
IF XSEASON EQ 'S3' THEN 'S13' ELSE
IF XSEASON EQ 'U3' THEN 'U13' ELSE
IF XSEASON EQ 'F3' THEN 'F13' ELSE
IF XSEASON EQ 'H3' THEN 'H13' ELSE
IF XSEASON EQ 'R3' THEN 'R13' ELSE
IF XSEASON EQ 'S4' THEN 'S14' ELSE
IF XSEASON EQ 'U4' THEN 'U14' ELSE
IF XSEASON EQ 'F4' THEN 'F14' ELSE
IF XSEASON EQ 'H4' THEN 'H14' ELSE
IF XSEASON EQ 'R4' THEN 'R14' ELSE
IF XSEASON EQ 'S5' THEN 'S15' ELSE
IF XSEASON EQ 'U5' THEN 'U15' ELSE
IF XSEASON EQ 'F5' THEN 'F15' ELSE
IF XSEASON EQ 'H5' THEN 'H15' ELSE
IF XSEASON EQ 'R5' THEN 'R15' ELSE
XSEASON;
RLMCATCODE/A10 = DECODE YY(10Accessories,'09' ...
-**
ELSE III) ;
RLMCATDESC/A40 = DECODE YY(10Accessories,'Accessories' ...
-**
ELSE III) ;
RLMSTYDSC2/A40 = DECODE YY(10Accessories,'MENS ACCESSORIES' ...
-**
ELSE III) ;
RLMSTYDSC2_CAP/A40 = UPCASE(40,RLMSTYDSC2 , 'A40');
FABRIC_CONTENT_CAP/A100V = UPCASE(100, FABRIC_CONTENT, 'A100V');
NEW_SCALE/A10 = IF SELLING_SIZE_CODE EQ 'W5' AND XX EQ '31' THEN 'W6' ELSE
IF SELLING_SIZE_CODE EQ 'W5' AND XX EQ '33' THEN 'W7' ELSE
IF SELLING_SIZE_CODE EQ 'W5' AND XX EQ '35' THEN 'M1' ELSE
SELLING_SIZE_CODE;
END
TABLE FILE mtx_products_new
BY XDIVISION AS 'Division'
-*BY DIVISION AS 'Division'
BY RLMSEASON AS 'Season'
BY STYLE_NUMBER AS 'Style Number'
BY COLOR_CODE AS 'Color Code'
PRINT
COLOR_NAME AS 'Color Name'
NEW_SCALE AS 'Size Scale'
XX AS 'Inseam'
DELIVERY_PERIOD_CODE AS 'Delivery Period'
-* Description length in RLM is only 20 characters
-* EDI_DESCRIPTION AS 'Style Description'
PROD_DESCR AS 'Style Description'
RLMSTYDSC2_CAP AS 'Style Description 2'
RLMCATCODE AS 'RLM Category Code'
RLMCATDESC AS 'RLM Category Description'
FABRIC_CONTENT_CAP AS 'Fabric Content'
PACKHANG AS 'Pack/Hang'
US_WHOLESALE__WHOLESALE_PRICE AS 'Wholesale Price'
US_WHOLESALE__RETAIL_PRICE AS 'MSRP'
US_OUTLET__RETAIL_PRICE AS 'Outlet Price'
LDP_COST AS 'RLM Cost'
-IF &DIVISION EQ '$*' THEN GOTO NODIV ;
IF DIVISION EQ '&DIVISION'
-NODIV
-IF &SEASON EQ '$*' THEN GOTO NOSEA ;
IF SEASON EQ '&SEASON'
-NOSEA ;
-IF &DPER EQ '$*' THEN GOTO NODP ;
IF DELIVERY_PERIOD_DESCRIPTION EQ '&DPER'
-NODP
-IF &LINE_PLAN EQ '$*' THEN GOTO NOLP
IF LINE_PLAN EQ '&LINE_PLAN'
-NOLP
-IF &PRODUCT_STATUS EQ '$*' THEN GOTO NOPS ;
IF PRODUCT_STATUS EQ '&PRODUCT_STATUS' ;
-NOPS
-IF &RLM_EXPORT_FLAG EQ '$*' THEN GOTO NOXFLG ;
IF RLM_EXPORT_FLAG EQ '&RLM_EXPORT_FLAG'
-NOXFLG
IF LWDATE GE '&LAST_MODIFIED_DATE'
IF XX NE ' '
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE SET STYLE *
UNITS=IN,
PAGESIZE='SCREEN',
LEFTMARGIN=0.000000,
RIGHTMARGIN=0.000000,
TOPMARGIN=0.000000,
BOTTOMMARGIN=0.000000,
SQUEEZE=ON,
ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=8,
COLOR='BLACK',
BACKCOLOR='NONE',
STYLE=NORMAL,
RIGHTGAP=0.125000,
TOPGAP=0.013889,
BOTTOMGAP=0.027778,
$
TYPE=DATA,
FONT='ARIAL',
SIZE=8,
COLOR='BLACK',
BACKCOLOR=( 'WHITE' RGB(255 255 224) ),
STYLE=NORMAL,
$
TYPE=TITLE,
STYLE=BOLD,
$
TYPE=TABHEADING,
STYLE=BOLD,
$
TYPE=TABFOOTING,
STYLE=BOLD,
$
TYPE=HEADING,
BACKCOLOR=RGB(210 180 140),
SIZE=10,
STYLE=BOLD,
$
TYPE=FOOTING,
STYLE=BOLD,
$
TYPE=SUBHEAD,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBFOOT,
SIZE=10,
STYLE=BOLD,
$
TYPE=SUBTOTAL,
BACKCOLOR=RGB(210 210 210),
SIZE=8,
STYLE=BOLD,
$
TYPE=GRANDTOTAL,
BACKCOLOR=RGB(210 210 210),
SIZE=10,
STYLE=BOLD,
$
ENDSTYLE
END
-EXIT
Lloyd Prendergast Michael Kors (USA), Inc. Phone: 201-453-5076 Fax: 646-354-4776 Lloyd.Prendergast@Michaelkors.com
what's even stranger is that some times it works.... I'll also add that this report has been running for several years with only minor changes, but no recent changes.
~~~ Something changed.
Can you mimic this with astandard / sample IB file?
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005
That's the thing, I can't.. or haven't been able to. It always seems to work as expected...
I have stripped the report down to just the decode and a simple print statement, and it works as expected...
My only thought is something changed on the PLM (that's where this data is coming from, and seperate system running oracle) but it won't explain why it works some times and not others.
Lloyd Prendergast Michael Kors (USA), Inc. Phone: 201-453-5076 Fax: 646-354-4776 Lloyd.Prendergast@Michaelkors.com
some of your style descriptions in your source data file may have become right adjusted...just to keep you crazy. happens in external-sourced data systems sometimes. try to stick in a LJUST on style_desc before editing and carrying on..
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
Susannah, your are my hero-ine.... I never would of thought to try that, still not sure why it worked. When I look at the data its clearly not right justified. ...and even if it were I wanted 20 chars out of 25, something should of printed.
and than there's the randomness factor..some records working, some records not...
But it's fixed.
Lloyd Prendergast Michael Kors (USA), Inc. Phone: 201-453-5076 Fax: 646-354-4776 Lloyd.Prendergast@Michaelkors.com
that's the trouble with 'looking' at the data in html, all the leading blanks are smashed into 1 blank. i think SET STYLEMODE = FIXED (or somesuch) helps. we had that problem with KPI data, the folks who sent over the cashregister data from our stores... so i remembered..
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003