Focal Point Banner


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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
maintain
 Login/Join
 
Silver Member
posted
I'm running a maintain application that calls a fex, and within that fex I have a -INCLUDE. The -INCLUDE has set &variables. When maintain calls the program, I get an error.

My question is, how can I add a program with set variables.


Here's the code



-INCLUDE user_security
-INCLUDE get_user

-* &1 DOC NUMBER
-DEFAULT &1=' '
-* &2 DOC DATE FROM
-DEFAULT &2=' '
-* &3 DOC DATE TO
-DEFAULT &3=' '
-* &4 VENDOR NAME
-DEFAULT &4=' '
-* &5 FISCAL YEAR
-DEFAULT &5=' '
-* &6 INDEX
-DEFAULT &6=' '
-* &7 OBJECT
-DEFAULT &7=' '
-* &8 PCA
-DEFAULT &8=' '
-* &9 PROJ/WP
-DEFAULT &9=' '
-* &10 BALANCE FROM
-DEFAULT &10=' '
-* &11 BALANCE TO
-DEFAULT &11=' '
-* &12 RECORDLIMIT
-DEFAULT &12=500

-SET &ECHO='ALL';

-SET &WHR_DOCNBR = IF &1 NE ' ' THEN 'WHERE D_DOCNBR LIKE ' | '''' | &1 | ''''| ' ;' ELSE ' ' ;
-SET &WHR_DTE_FR = IF &2 NE ' ' THEN 'WHERE DOCDATE GE ' | '''' | &2 | ''''| ' ;' ELSE ' ' ;
-SET &WHR_DTE_TO = IF &3 NE ' ' THEN 'WHERE DOCDATE LE ' | '''' | &3 | ''''| ' ;' ELSE ' ' ;
-SET &WHR_VNAME = IF &4 NE ' ' THEN 'WHERE VNAME LIKE ' | '''' | &4 | ''''| ' ;' ELSE ' ' ;
-SET &WHR_FFY = IF &5 NE ' ' THEN 'WHERE FFY LIKE ' | '''' | &5 | ''''| ' ;' ELSE ' ' ;
-SET &WHR_IC = IF &6 NE ' ' THEN 'WHERE IC LIKE ' | '''' | &6 | ''''| ' ;' ELSE ' ' ;
-SET &WHR_OBJCT = IF &7 NE ' ' THEN 'WHERE D_OBJCT LIKE ' | '''' | &7 | ''''| ' ;' ELSE ' ' ;
-SET &WHR_PCA = IF &8 NE ' ' THEN 'WHERE PCA LIKE ' | '''' | &8 | ''''| ' ;' ELSE ' ' ;
-SET &WHR_PROJWP = IF &9 NE ' ' THEN 'WHERE D_PROJWP LIKE ' | '''' | &9 | ''''| ' ;' ELSE ' ' ;
-SET &WHR_BAL_FR = IF &10 NE ' ' THEN 'WHERE BALCM0 GE ' | &10 | ' ;' ELSE ' ' ;
-SET &WHR_BAL_TO = IF &11 NE ' ' THEN 'WHERE BALCM0 LE ' | &11 | ' ;' ELSE ' ' ;
FILEDEF PSORT DISK psort.fex
FILEDEF ISORT DISK isort.fex
-RUN
DEFINE FILE ENC004
D_DOCNBR/A11 = DOCNO || '-' ||DOCNOSFX ;
D_OBJCT/A5 = OBJDET || AGYOBJ ;
D_PROJWP/A8 = PROJ || WP ;
-*TRANDATE/YYMD = HDATE(DOCDATE,'YYMD');
-*D_DOCDTE/MDYY=TRANDATE;
D_DOCDTE/MDYY=DOCDATE;
END
TABLE FILE ENC004
SUM D_DOCNBR
DOCNO
DOCNOSFX
FFY
PCA
IC
D_PROJWP
PROJ
WP
D_OBJCT
OBJDET
AGYOBJ
VNO
VESFX
VNAME
MIN.BALCM0
D_DOCDTE
DOCDATE

BY D_DOCNBR NOPRINT
BY DOCNO NOPRINT
BY DOCNOSFX NOPRINT
BY FFY NOPRINT
BY PCA NOPRINT
BY IC NOPRINT
BY D_PROJWP NOPRINT
BY PROJ NOPRINT
BY WP NOPRINT
BY D_OBJCT NOPRINT
BY OBJDET NOPRINT
BY AGYOBJ NOPRINT
BY VNO NOPRINT
BY VESFX NOPRINT
BY VNAME NOPRINT
BY D_DOCDTE NOPRINT
BY DOCDATE NOPRINT
-*WHERE ORG EQ '3790';
-INCLUDE psort
-INCLUDE isort
WHERE BALCM0 GT 0;
WHERE RECORDLIMIT EQ &12
-*ON TABLE SET ASNAMES ON
-*ON TABLE SET HOLDLIST PRINTONLY
ON TABLE PCHOLD
END
-RUN


Thanks,


jd


7.61, nt
Output: excel, pdf, html,
 
Posts: 33 | Registered: January 10, 2008Report This Post
Expert
posted Hide Post
What error are you getting? Can it find the program? If not, you can do this:

-INCLUDE directory_name_where_program_is/program_name


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Silver Member
posted Hide Post
It parses anything that you put in there. If it's not part of maintain, it spits it out.


7.61, nt
Output: excel, pdf, html,
 
Posts: 33 | Registered: January 10, 2008Report This Post
Master
posted Hide Post
If you run the FEX outside of Maintain it works, but if you EXEC it from Maintain you get an error? You cannot use -INCLUDE from Maintain. You have to use EXEC.

EXEC procedure

from inside the Maintain. It would help to see the error. It IS possible you are doing something in the external procedure that is confusing Maintain, but you SHOULD be able to do anything in the EXEC'd procedure that you can do from inside WebFOCUS.

Mark
 
Posts: 663 | Location: New York | Registered: May 08, 2003Report This Post
Silver Member
posted Hide Post
Mark,

I will try that. I'm not doing anything special. All I'm doing is passing a variable from the other fex to the main fex. What this fex is doing, it's a value from a table and placing it into a fex that is use to filter on the main fex.


7.61, nt
Output: excel, pdf, html,
 
Posts: 33 | Registered: January 10, 2008Report This Post
Silver Member
posted Hide Post
Mark,

The other question is, can you put an EXEC command within another fex?


TABLE FILE CAR
PRINT MODEL
BY COUNTER
EXEC test.fex
END


7.61, nt
Output: excel, pdf, html,
 
Posts: 33 | Registered: January 10, 2008Report This Post
Virtuoso
posted Hide Post
When you're in maintain you can use the maintain EXEC command from within a maintain case to run any other focexec. It will then run on a different agent then where your maintain is running. It will accept any input from the maintain that is specified with the EXEC command, which input will be available as &-variables within your focexec. Return value from the focexe will have to be in the standard ibi xml output format, wich the maintain will then receive as a stack of data.

This is completely different from the EXEC (also known as EX) command that you could use to run a focexec from within another focexec. The processing for that is being done within the same agent as where your original focexec runs and can not be issued in the midst of a define or table command (as opposed to -INCLUDE, which can).

Hope this doesn't make it any more confusing, but you have to understand that the EXEC command in maintain is completely different from the focus EXEC command.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders