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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Passing a Value

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Passing a Value
 Login/Join
 
Gold member
posted
Hello everyone,

I have a procedure that has multiple procedures. Each procedure prompts for a &termcode value. Is there a way to enter the value once and have it pass from one procedure to the next. That way I don't have to hard code and the enduser doesn't have to enter the parameter multiple times. I tried to give an example below:

TABLE FILE AS_STUDENT_ENROLLMENT_SUMMARY
PRINT
ID
LAST_NAME
FIRST_NAME
MIDDLE_INITIAL
ENROLLMENT_AR_IND
CLAS_CODE
TOTAL_BILLING_HOURS
OVERALL_LGPA_GPA
MAJR_DESC1
BY PIDM_KEY
HEADING
""
FOOTING
""
WHERE TERM_CODE_KEY EQ '&TERM_CODE_KEY.Enrollment Term Code.';
WHERE ( TOTAL_BILLING_HOURS GT 0 );
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE HOLD AS INDHOLD FORMAT FOCUS INDEX 'PIDM_KEY'

TABLE FILE SLRRASG
PRINT
SLRRASG_TERM_CODE
SLRRASG_BLDG_CODE
SLRRASG_ROOM_NUMBER
SLRRASG_BEGIN_DATE
SLRRASG_END_DATE
SLRRASG_AR_IND
BY SLRRASG_PIDM
HEADING
""
FOOTING
""
WHERE SLRRASG_TERM_CODE EQ '&SLRRASG_TERM_CODE.Room Term Code.';
WHERE SLRRASG_ASCD_CODE EQ 'AC';
ON TABLE SET PAGE-NUM OFF
ON TABLE SET BYDISPLAY ON
ON TABLE NOTOTAL
ON TABLE HOLD AS HOUSHOLD FORMAT FOCUS INDEX 'SLRRASG_PIDM'

TABLE FILE SLRMASG
PRINT
SLRMASG_BEGIN_DATE
SLRMASG_END_DATE
SLRMASG_MSCD_CODE
SLRMASG_AR_IND
SLRMASG_MRCD_CODE
BY SLRMASG_PIDM
HEADING
""
FOOTING
""
WHERE SLRMASG_TERM_CODE EQ mmm;
WHERE SLRMASG_MSCD_CODE EQ 'WD' OR 'AC';
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE HOLD AS MEALHOLD FORMAT FOCUS INDEX 'SLRMASG_PIDM'

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


WebFOCUS 7.6.2, MS Windows Server/______, Excel, PDF, HTML
 
Posts: 91 | Registered: May 15, 2008Report This Post
Expert
posted Hide Post
You can try using a global amper variable, &&var. They are valid for the entire session.


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
Gold member
posted Hide Post
Ginny do I just add && where the variable appear or do I have to declare it somewhere in the beginning?


WebFOCUS 7.6.2, MS Windows Server/______, Excel, PDF, HTML
 
Posts: 91 | Registered: May 15, 2008Report This Post
Expert
posted Hide Post
Well, it depends. You can prompt for the single amper variable in the main parent program. Once in there, set the double amper variable with the contents of the single. In your child program, reference the double.

You don't have to declare it. Just make sure that it has a value when it needs to.


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
Platinum Member
posted Hide Post
This might be a redundant comment:
If the child fexes are -INCLUDEd ie.
-INCLUDE child_fex_name
then you should be fine.
If the child fexes are EXecuted ie.
EX child_fex_name
then you want to pass the parameter as follows:
EX child_fex_name TERM_CODE_KEY=&TERM_CODE_KEY
enclose &TERM_CODE_KEY in single quotes if the value may contain spaces.
Regards


--------------------------------------------------------------------------------
prod: WF/AS 8.2.05; OmniGen;
In FOCUS since 1991
 
Posts: 104 | Location: United Kingdom | Registered: February 07, 2008Report This Post
Gold member
posted Hide Post
Don't know if this will help or not, but I do alot of procedures with multiples reports and the easiest way I found to pass a parameter is set a default at the beginning of the procedure. For example:

-DEFAULT &YEAR='2008'

and then whenever &YEAR appears anywhere in the procedure, it will pick up whatever data is input in the parameter.


PROD: WebFocus 7.6.9 on WinXP
 
Posts: 59 | Registered: October 31, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Passing a Value

Copyright © 1996-2020 Information Builders