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, I am new on Web Focus. I have been creating a Fex with developer studio 7.6.1. In a part of the FEX I need to repeat in the same line (a COMPUTE FIELD) the reading of a Date and the operations between other fields.
ex. my fields has this information:
DATEX (may have the dates: 12/01/2011, 13/01/2011, 14/01/2011, 15/01/2011, 16/01/2011) FIELD1 (may have the values: 25, 35, 18, 35, 25, each value corresponding to a each date) FIELD2 (may have the values: 18, 30, 16, 10, 25, too, each value correponding to a each date)
This FEX will export to an Excel file and the results appear like this:
.... .... Type: In Form: Credit Name: Enterprise Code: ELA2508203L8 Address: Matamoros 25 Sent Description: 12/01/2011 25-18=7, 13/01/2011 35-30=5, 14/01/2011 18-16=2, 15/01/2011 35-10=25, 16/01/2011 25-25=0 Total: $452 ... ... I hope that somebody can advise to me and guide to me. Thanks! AntonioThis message has been edited. Last edited by: Kerry,
WebFocus 7.6.10, windows 7, win server 2003-2008 PDF, TXT, XML, html, xls, doc
Where FAC_FECHA is the date that I´ll use ENTREGA is the field1 DEVOLUCION is the field2
And the data is like I showed them above
FAC_FECHA (it can have this values 12/01/2011, 13/01/2011, 14/01/2011, 15/01/2011, 16/01/2011) ENTREGA (it can have this values 25, 35, 18, 35, 25) DEVOLUCION (it can have this values 18, 30, 16, 10, 25)
Thanks!
WebFocus 7.6.10, windows 7, win server 2003-2008 PDF, TXT, XML, html, xls, doc
You will need to convertt he dates and numerics to alpha, then you can concatenate them together.
Simple example:
DEFINE FILE ggorder
ORDER_CONCAT/A100V = IF ORDER_NUMBER EQ 1
THEN EDIT(DATECVT(ORDER_DATE,'MDY','A6MDY'),'99/99/99')
ELSE LAST ORDER_CONCAT || (', ' | EDIT(DATECVT(ORDER_DATE,'MDY','A6MDY'),'99/99/99')) ;
END
TABLE FILE ggorder
SUM LST.ORDER_CONCAT
WHERE ORDER_NUMBER LE 5
END
Hi, thanks, I used your idea, and I tried to put it in my fex, but I got some incorrect results. I show you the results:
-------------------------------------------------------------------------------- 2.0 ME 1933 0000030169 2009 Ingreso
GUIA EL DEBATE 19.20 01:02-02=00 GUIA EL DEBATE 19.20 01:02-02=00->02 :02-02=00 GUIA EL DEBATE 19.20 01:02-02=00->02 :02-02=00->03 :02-02=00 GUIA EL DEBATE 19.20 01:02-02=00->02 :02-02=00->03 :02-02=00->04 :02-02=00 --------------------------------------------------------------------- the reading of the data is correct, but it put them in different blocks (lines). I tried to do an "Count", but then the reading of the data was incorrect. Too, If I use the verb PRINT, doesn´t appear the data
I show you the Code that I use, I appreciate your suggestions:
----------------------------------------------------------------------- -* File facxml-separado.fex DEFINE FILE FACTURACIRCULACION DIA/D2=HPART(HDTTM(FACTURACIRCULACION.FACTURACIRCULACION.LIN_FECHAPORTADA, 10, 'HYYMDS'), 'DAY', DIA); MES/D2=HPART(HDTTM(FACTURACIRCULACION.FACTURACIRCULACION.LIN_FECHAPORTADA, 10, 'HYYMDS'), 'MONTH', MES); DIAMES/A5=EDIT( MES)||':'||EDIT( DIA); DIAA/A2=EDIT(DIA); Dent/D2=FACTURACIRCULACION.FACTURACIRCULACION.ENTREGA; Ddev/D2=FACTURACIRCULACION.FACTURACIRCULACION.DEVOLUCION; END TABLE FILE FACTURACIRCULACION SUM COMPUTE guia/A4 = 'GUIA'; AS '' OVER 'FACTURACIRCULACION.FACTURACIRCULACION.PRO_NOMBREEXTENDIDO' AS '' OVER 'FACTURACIRCULACION.FACTURACIRCULACION.LIN_BASEIMPONIBLE/D10.2' AS '' OVER COMPUTE DTot/D2 = Dent - Ddev; AS '' NOPRINT COMPUTE DDet/A8 = EDIT(Dent)||'-'||EDIT(Ddev)||'='||EDIT(DTot);AS '' NOPRINT COMPUTE CONCATENADO/A250 = IF ( FACTURACIRCULACION.FACTURACIRCULACION.PRO_NOMBREEXTENDIDO EQ LAST FACTURACIRCULACION.FACTURACIRCULACION.PRO_NOMBREEXTENDIDO ) THEN ( IF ( MES EQ LAST MES ) THEN SUBSTR(250, CONCATENADO, 1, 220, 220, 'A220') || '->'|| DIAA || ' :'|| DDet ELSE SUBSTR(250, CONCATENADO, 1, 220, 220, 'A220') || '->'|| DIAMES || ' :'|| DDet ) ELSE DIAA || ': '||DDet; AS '' OVER COMPUTE CONTADOR/I5 = IF FACTURACIRCULACION.FACTURACIRCULACION.PRO_NOMBREEXTENDIDO EQ LAST FACTURACIRCULACION.FACTURACIRCULACION.PRO_NOMBREEXTENDIDO THEN CONTADOR + 1 ELSE 1; AS '' NOPRINT BY 'FACTURACIRCULACION.FACTURACIRCULACION.FAC_NUMERO' NOPRINT BY 'FACTURACIRCULACION.FACTURACIRCULACION.FAC_SUCURSAL' NOPRINT BY 'FACTURACIRCULACION.FACTURACIRCULACION.PRO_NOMBREEXTENDIDO' NOPRINT BY 'FACTURACIRCULACION.FACTURACIRCULACION.LIN_FECHAPORTADA' NOPRINT HEADING " " "2.0" """0000030169" "2009" "Ingreso"
" " " " FOOTING "" WHERE FACTURACIRCULACION.FACTURACIRCULACION.FAC_NUMERO EQ '&FAC_NUMERO' WHERE FACTURACIRCULACION.FACTURACIRCULACION.FAC_SUCURSAL EQ '&FAC_SUCURSAL' ON TABLE SET EMPTYCELLS ON ON TABLE SET PAGE-NUM OFF ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT EXL2K END ------------------------------------------------------------------------
Thanks!!
WebFocus 7.6.10, windows 7, win server 2003-2008 PDF, TXT, XML, html, xls, doc
It's not quite clear how many lines you expect and if the number of records to concatenate are always in groups-of-5. Below you'll find an example of making the concatenated line, but the number of consecutive records to combine into 1 line is (in this example) hardcoded to 5.
-* Replace periods with spaces (spaces are trimmed to 1 in HTML after posting) -WRITE thefile 12012011......25......18 -WRITE thefile 13012011......35......30 -WRITE thefile 14012011......18......16 -WRITE thefile 15012011......35......10 -WRITE thefile 16012011......25......25
TABLE FILE thefile SUM COMPUTE COUNTER/I2 = LAST COUNTER + 1; NOPRINT COMPUTE THELINE/A1000V = IF LAST THELINE EQ '' THEN 'Sent Description: ' | LINE3 ELSE LAST THELINE || (', ' | LINE3); BY LINE3 NOPRINT WHERE TOTAL COUNTER EQ 5 ; END -RUNThis message has been edited. Last edited by: <FreSte>,
I´m expecting almost a month, i mean 30 or 31 days for example, (shown in 1 line). This line is in the midle of other lines or fields. Of course the dates and data will change. I Show you the example that I want in the result: I have 2 products (El Debate, and La Razón):
.... .... Guia 19.20 El Debate 01: 25-18=7, 02: 35-30=5, 03: 18-16=2, 04: 35-10=25, 05: 25-25=0 ... (n days in the invoice) Guia 4.50 La Razón 01: 20-18=2, 02: 25-20=5, 03: 28-12=16, 04: 15-1=14, 05: 22-15=7 ... (n days in the invoice) ... ...
The line that I need and i have troubles to show is where dates appear. I only use the day of the date. Thanks.This message has been edited. Last edited by: anrix,
WebFocus 7.6.10, windows 7, win server 2003-2008 PDF, TXT, XML, html, xls, doc
OK, things are more clear now. I made a new flat file with all days in January and some in February. The example below is only for generating the concattenated line.