Focal Point
[SOLVED] On table hold won't update my data in my hold file/GLOBAL FILTER

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9157055096

July 16, 2018, 11:20 AM
KellyT
[SOLVED] On table hold won't update my data in my hold file/GLOBAL FILTER
When I run my fex and say "ON TABLE HOLD AS MDGETFLEETDEV" and then run my fex the data in the hold file will not update.

If i run the same fex but just change to ON table PC hold Format HTML it will show the results.

so when i change the userinitials and run the fex the data does not change.

Thanks in advance

 
-DEFAULTH &USERINITIALS = 'WKW';


APP HOLD metricsdash

ENGINE SQLSYB SET DEFAULT_CONNECTION SYBASE

SQL SQLSYB
EX mastersys..GetFleetByInitialsOrID '&USERINITIALS';
-*EX mastersys..GetFleetByInitialsOrID '&FOCSECUSER';
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS MDUSERFLEETDEV
END

TABLE FILE MDUSERFLEETDEV
PRINT
     fleetId
     initials
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE HOLD AS MDGETFLEETDEV FORMAT FOCUS
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = endeflt,
$
ENDSTYLE
END



TABLE FILE MDGETFLEETDEV
WHERE MDGETFLEETDEV.SEG01.fleetId EQ &fleetId.(FIND MDGETFLEETDEV.SEG01.fleetId IN MDGETFLEETDEV).fleetId:.;
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = endeflt,
$
ENDSTYLE
END 

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


Prod: WebFOCUS 8.2.0.4
OS: Windows
Outputs: HTML, PDF, Excel, PPT
In Focus since 2005
July 16, 2018, 11:28 AM
Wep5622
Perhaps you have a file MDGETUSERFLEETDEV earlier in your path somewhere?

Or anywhere in your path and the EX procedure results in some error and doesn't produce the expected HOLD file?

Try WHENCE MDGETUSERFLEETDEV MASTER


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
July 16, 2018, 11:36 AM
BabakNYC
Try APP HOLDMETA and APP HOLDDATA.
https://webfocusinfocenter.inf...ang/source/out96.htm


WebFOCUS 8206, Unix, Windows
July 16, 2018, 11:39 AM
KellyT
That didn't change my results. So i did more testing.

I think it must have something to do with my Global Filter I'm trying to create.
If I comment out the where clause and put a print statement in then i'm getting the correct results.

So now my question is how to i fix creating this global filter. I followed the directions in the Release manually for creating them.


 TABLE FILE MDGETFLEETDEV
PRINT
	fleetId
-*WHERE fleetId EQ &fleetId.(FIND fleetId IN MDGETFLEETDEV).fleetId:.;
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = endeflt,
$
ENDSTYLE
END 



Prod: WebFOCUS 8.2.0.4
OS: Windows
Outputs: HTML, PDF, Excel, PPT
In Focus since 2005
July 16, 2018, 11:49 AM
BabakNYC
If you're creating a list of fleetId's to be used in the WHERE test, I think it's better not to use PRINT fleetId. You should use BY fleetID instead so you get just he unique values.
SET HOLDLIST=PRINTONLY  
TABLE FILE MDUSERFLEETDEV
BY  fleetId
BY  initials
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE HOLD AS MDGETFLEETDEV FORMAT FOCUS
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = endeflt,
$
ENDSTYLE
END



WebFOCUS 8206, Unix, Windows
July 16, 2018, 11:55 AM
KellyT
Hello,

I tried that and still doesn't work.
If I have the
 TABLE FILE MDGETFLEETDEV
-*PRINT
-*	fleetId
WHERE fleetId EQ &fleetId.(FIND fleetId IN MDGETFLEETDEV).fleetId:.;
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = endeflt,
$
ENDSTYLE
END 



it won't update my hold table.
if i remove the where clause and use the print fleetId it will update the hold table.

Is there another way to create a global filter?


Prod: WebFOCUS 8.2.0.4
OS: Windows
Outputs: HTML, PDF, Excel, PPT
In Focus since 2005
July 16, 2018, 12:06 PM
BabakNYC
Does this example work in your environment?

 
APP PATH IBISAMP
APP HOLD IBISAMP
TABLE FILE CAR
BY CAR.ORIGIN.COUNTRY
WHERE CAR.ORIGIN.COUNTRY EQ 'ENGLAND' OR 'FRANCE';
ON TABLE HOLD AS File1 FORMAT FOCUS
END
-RUN

TABLE FILE CAR
SUM CAR.BODY.DEALER_COST
CAR.BODY.RETAIL_COST
BY CAR.ORIGIN.COUNTRY
BY CAR.COMP.CAR
WHERE CAR.ORIGIN.COUNTRY EQ &COUNTRY.(FIND COUNTRY IN File1|FORMAT=A10,SORT=ASCENDING).COUNTRY:.QUOTEDSTRING;
ON TABLE PCHOLD FORMAT HTML
END

-RUN

 



WebFOCUS 8206, Unix, Windows
July 16, 2018, 12:07 PM
KellyT
I found this article but it doesn't look like there was an answer:

http://forums.informationbuild...097018136#3097018136


Prod: WebFOCUS 8.2.0.4
OS: Windows
Outputs: HTML, PDF, Excel, PPT
In Focus since 2005
July 16, 2018, 12:08 PM
KellyT
Hi BabakNYC

no that does not. The country drop down list comes back as blank.


Prod: WebFOCUS 8.2.0.4
OS: Windows
Outputs: HTML, PDF, Excel, PPT
In Focus since 2005
July 16, 2018, 12:09 PM
BabakNYC
I assume you have the sample file called CAR. Does this work?

 
APP PATH IBISAMP
APP HOLD IBISAMP
TABLE FILE CAR
BY CAR.ORIGIN.COUNTRY
WHERE CAR.ORIGIN.COUNTRY EQ 'ENGLAND' OR 'FRANCE';
ON TABLE HOLD AS File1 FORMAT FOCUS
END
-RUN

TABLE FILE File1
PRINT *
ON TABLE PCHOLD FORMAT HTML
END

-RUN

 

I don't have access to 8104 anymore. I suggest you open a case with IB Tech support.


WebFOCUS 8206, Unix, Windows
July 16, 2018, 12:18 PM
KellyT
Yes that works.

I get
Country Country
England England
France France


Prod: WebFOCUS 8.2.0.4
OS: Windows
Outputs: HTML, PDF, Excel, PPT
In Focus since 2005
July 27, 2018, 07:58 AM
WFConsultant
Hi KellyT, Did you get this issue resolved? That is, updating a hold file on the fly and using it in a filter.

This message has been edited. Last edited by: WFConsultant,


WebFOCUS 8207.11
App Studio 8207
August 01, 2018, 03:16 PM
KellyT
I did get it resolved in a round about way. I ended up creating metadata against a stored procedure to pull the correct fleetid i was looking for. Doing this I didn't have to create a hold file within my fex file.


Prod: WebFOCUS 8.2.0.4
OS: Windows
Outputs: HTML, PDF, Excel, PPT
In Focus since 2005