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] Use a variable value in displaying name of the field with help of ASNAMES

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Use a variable value in displaying name of the field with help of ASNAMES
 Login/Join
 
Member
posted
Hi All,

I am using a variable, say:
PREV.MED/A14 = MED|MONTH.PR|PREV.YR;


The above field PREV.MED has some value say, MEDAUG10.

When I am calculating another field, say:
PREV.MED.TOT/I5 = 88888;

Now, When I am writing the report:
Write
PREV.MED.TOT AS PREV.MED
END

So I am expecting:
MEDAUG10
--------
88888

Please advise if this can be implemented.

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


FOCUS 7.6.11
Windows, Excel, LOTUS, ALPHA
 
Posts: 14 | Location: New Delhi | Registered: September 20, 2011Report This Post
Guru
posted Hide Post
What about an amper variable?

-SET &asname = '88888';


PREV.MED.TOT AS &asname


WebFOCUS DS 8.0.06/08 DS/AS
WebFOCUS RS 8.0.08 (Linux/IBM i)
WebFOCUS Client 8.0.06 (Linux)
 
Posts: 319 | Location: Stockholm, Sweden | Registered: February 04, 2004Report This Post
Member
posted Hide Post
Hi Lidholm,

I am using it, since I have a varibale in which I am storing a value, the code mention by you is picking the text of the variable.

You see, the variable is dynamic and suppose to change every month. So I need to have that a dynamic value to it.

Let me know if I have put this clearly.

Thanks


FOCUS 7.6.11
Windows, Excel, LOTUS, ALPHA
 
Posts: 14 | Location: New Delhi | Registered: September 20, 2011Report This Post
Platinum Member
posted Hide Post
Hi,

You can first read the values into a amper variable and use that as Lidholm suggested.
Something like

  
TABLE FILE TABLENAME
PRINT
COMPUTE PREV.MED/A14 = MED|MONTH.PR|PREV.YR; 
ON TABLE SAVE AS FIL1
END
-RUN
-READ FIL1, &COLNAME
TABLE FILE TABLENAME
PRINT
COMPUTE PREV.MED.TOT AS &COLNAME
END




Thanks
Sashanka


WF 7.7.03/Windows/HTML,PDF,EXL
POC/local Dev Studio 7.7.03 & 7.6.11
 
Posts: 103 | Registered: June 12, 2009Report This Post
Member
posted Hide Post
quote:
Sashanka

Hi Sashanka,

Thank you for your reply. Your thought worked with a slight addition to it.

I followed:
Before saving the SAVE file I used -SET &PREV = ' ';

Then I stored it in a SAVE file.
After this:
-RUN
-READ FIL1 &PREV
TABLE FILE MYHOLD
WRITE PREV.MED.TOT AS &PREV
BY FIELD1
ON TABLE HOLD AS HOLDDONE
END

It worked smoothly.

Thank you Lidholm and Sashanka.

Note: peroid was not accepting:
I have changed -SET &PREV.MED to -SET &PMED to get the desired results.


FOCUS 7.6.11
Windows, Excel, LOTUS, ALPHA
 
Posts: 14 | Location: New Delhi | Registered: September 20, 2011Report This Post
Expert
posted Hide Post
I would strongly suggest that you do not use a period as a name part separator, as this is used by WebFOCUS to separate Masters and Segmetns and file names, as well as functions like MAX, MIN, FST, LST and TOT.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | 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] Use a variable value in displaying name of the field with help of ASNAMES

Copyright © 1996-2020 Information Builders