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.
I am in the process of trying to develop a report for our customers that would prompt them for an item code, and then produce a report displaying all orders that have that item on it for a predetermined amount of time. I have the framework of the report done, and it works. The problem I�m running into is when I try to include (-Include) an additional file. This file, a customer definition file, is set up so that when a customer logs in, he or she can see only information for their particular account. We�ve used this file in other reports that don�t prompt the user for parameters. However, in the report I am working on now, the user is prompted for parameters that should be supplied by the customer definition file. How can I set it up so that the user is prompted only for the item code? Here is what I have been working on.
-SET &ECHO=ALL; SET LINES=999999 -INCLUDE CUSTDEF1 -RUN
TABLE FILE SALES
PRINT QTYORD BY PRODNO BY PRODNAME BY SHIPDT BY CUSTNO
ON TABLE HOLD AS HOLD1 FORMAT ALPHA
WHERE ADFLAG EQ 'A' WHERE SHIPDT GE 20050101
-IF &CUSTPARM.EXIST GOTO IFTEST ELSE GOTO BYTEST; -IFTEST WHERE ( CUSTNAME EQ '&CUSTPARM.CUSTPARM.' ); -BYTEST END
TABLE FILE HOLD1
PRINT PRODNO NOPRINT PRODNAME AS 'Product' QTYORD AS 'Quantity Ordered' SHIPDT AS 'Ship Date'
I've done a lot with variables set in other fexes, but never with a period in the variable, so I'll stay with general comments: 1. What happens if you take the quotes off? WHERE ( CUSTNAME EQ &CUSTPARM.CUSTPARM. ); 2. Is there supposed to be a period at the end of &CUSTPARM.CUSTPARM. ??? 3. Can you print the value of the variable set in the other fex? -TYPE Equals: &CUSTPARM.CUSTPARM 4. Finally, if you store the value of the variable set in the other fex to a new variable, can you print it to screen? &NEWVAR = &CUSTPARM -TYPE Equals: &NEWVAR I wish I had something more specific to offer. HTH JSouth
Any parameter that is being explicitly set will not be prompted for. So, I would recommend that you issue a: -SET &CUSTPARM='anything'; before the -INCLUDE.
I am assuming that &CUSTPARM is being set in the -INCLUDE'd fex.
Thank you both for your suggestions. I'm still somewhat of a novice, so could you tell me what the purpose of issuing the -SET &CUSTPARM is? The &CUSTPARM is set by the -INCLUDEd fex.
When WebFOCUS prompts you for a parameter list, it will only prompt you for parameters that haven't been explicitly set. This means that only parms that do not have a -SET will be prompted for. Unfortunately, your version of WF is not parsing the -INCLUDEd focexec. This means that it does not read the -SET in the include, and therefore thinks that it is an unresolved parm.
That might not be that clear!!! Maybe someone else can add to this?
I'm curious as to whether you are able to print the value of the variable set in the other fex when running the original fex: -TYPE ------------------------------------ -TYPE TYPING OUT THE VALUE OF PARAMETERS -TYPE FIRST PARAMETER: &CUSTPARM.CUSTPARM -TYPE SECOND PARAMETER: &CUSTPARM -TYPE ------------------------------------ Should give you this when you run your fex: ------------------------------------ TYPING OUT THE VALUE OF PARAMETERS FIRST PARAMETER: (ValueOfParameterAppearsHere) SECOND PARAMETER: (ValueOfParameterAppearsHere) ------------------------------------ If you do not get values, then you've proved that the -INCLUDE'd fex did not set the values, else you proved that it DID set the values. If it DID set the values, look to the syntax of your code for the problem. What version of WebFOCUS are you on? HTH JSouth
Thanks for checking back with me! I am still having issues. I tried using the -SET &CUSTPAR command but that didn't seem to work. I haven't tried your suggestions yet, largely because I am not sure where in the code to put it. I tried to research it in the documentation I have, but I haven't really found any answers yet.
Well, I would put the code to type out the parameters I was looking for just after the -INCLUDE to the fex where you expect those parameters to be set.