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     how to pass to a local variable from a variable generated by COMPUTE????

Read-Only Read-Only Topic
Go
Search
Notify
Tools
how to pass to a local variable from a variable generated by COMPUTE????
 Login/Join
 
Member
posted
Does anyone know how to pass to a local variable from a field generated by COMPUTE??
here's my code:

TABLE FILE RPTGRPS
SUM
COMPUTE REPORT_END01/YYMD=DATEMOV('&&REPORT_END','BOM');
COMPUTE DATA_START/YYMD=DATEADD(REPORT_END01,'Y',-1);
BY DIVNAME
END

i like to pass the DATA_START field from this table to a WHERE clause of another table, and this field is a constant but dont want to generate this in the second table to save the storage spaces.

or if there is another way to perform the same function as DATEMOV, DATEADD in the dialogue manager. can possibly pass it on as a local variable as well.

thank you.


Lilian
-------
WF 7.6 on WINXP, Teradata
 
Posts: 20 | Location: Toronto, Canada | Registered: August 04, 2006Report This Post
Platinum Member
posted Hide Post
Newbie,

Here are some examples of how we do date functions in Dialogue Manager...

-SET &ENDDATEX = DATECVT((DATEADD((DATECVT(&YYMD, I8YYMD, YYMD)), M, -1)), YYMD, I8YYMD);
-SET &ENDDATE1 = DATECVT((DATEMOV((DATECVT(&ENDDATEX, I8YYMD, YYMD)), EOM)), YYMD, I8YYMD);
-SET &BEGDATEX = DATECVT((DATEMOV((DATECVT(&ENDDATEX, I8YYMD, YYMD)), BOM)), YYMD, I8YYMD);

Hope this helps,

Kevin


WF 7.6.10 / WIN-AIX
 
Posts: 141 | Location: Denver, CO | Registered: December 09, 2005Report This Post
Member
posted Hide Post
thanks of the replies.

forgot to bring up that
&&REPORT_END='2006/07/15'
because i have to pass the variable to compare with a field in the YYMD format.
so my next question is there a way to convert a global variable to a local variable ??

thanks.

Lilian.


Lilian
-------
WF 7.6 on WINXP, Teradata
 
Posts: 20 | Location: Toronto, Canada | Registered: August 04, 2006Report This Post
Expert
posted Hide Post
Lillian,

Why change to a local:
-SET &RPT_END = &&REPORT_END;

The global, &&, is set for the entire seesion and you can calculate of it at anytime. A local, &, is only valid for that fex run.

Need to elaborate a bit more...

Tom


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Member
posted Hide Post
thanks TOM..

i realize the function (DATEMOV/DATEADD) does not work well with global variable in the dialogue manager, instead it's fine with local variable. however, i need to pass the parameter from web caster, which is the area i have not explored yet and assume it's the global variable.

But for the moment, i try your way and it's good..
thanks.

Lilian.


Lilian
-------
WF 7.6 on WINXP, Teradata
 
Posts: 20 | Location: Toronto, Canada | Registered: August 04, 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     how to pass to a local variable from a variable generated by COMPUTE????

Copyright © 1996-2020 Information Builders