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     load field's value into a variable

Read-Only Read-Only Topic
Go
Search
Notify
Tools
load field's value into a variable
 Login/Join
 
Platinum Member
posted
It's easy to assign the value of a variable to a field. But what about the reverse?

How do you assign the value of a field to a variable without having to do a -READ? If you have a data file and mfd, is there a way to read the file with a table request and then take the value of a field and put it into a variable?

Thank you,

John


WF 7.7.03, Windows 7, HTML, Excel, PDF
 
Posts: 225 | Location: San Francisco Bay Area, California | Registered: October 26, 2006Report This Post
Virtuoso
posted Hide Post
John,

Can this do the trick?
  
-* File johnb6.fex
-SET &ECHO=ALL;
FILEDEF JFEX DISK JFEX.FEX
SET HOLDLIST=PRINTONLY
TABLE FILE CAR
PRINT 
COMPUTE I/I1=1 + LAST I; NOPRINT
COMPUTE SET1/A30='-SET &|V' | EDIT(I,'9=''') | COUNTRY || ''';';
ON TABLE SAVE AS JFEX
END 
-RUN
-INCLUDE JFEX


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
A simpler variation would be:

TABLE FILE CAR
PRINT COUNTRY
IF RECORDLIMIT EQ 1
ON TABLE SAVE
END
-RUN
-READ SAVE &COUNTRY.A10.


There are lots of variations on this. You could read all the cars and save &LINES and use it as a loop counter to read all the countries in the SAVE files.

There should be lots of examples of this in forum posts. Try searching on SAVE or AMPER VARIABLE.

Hope this gives you some ideas.


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
Virtuoso
posted Hide Post
Ginny,

John said:
quote:

How do you assign the value of a field to a variable without having to do a -READ?

...


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
Sorry I missed that. I was up very late watching Olympics. Doesn't bode well for the rest of the day, does it? Confused


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
Virtuoso
posted Hide Post
Daniel - Seems like that is the very long way around just to avoid a -READ, but it DOES answer the question. Smiler

Either way, it's going to take two steps. There isn't a way to do it in a single steps. So

1)create -SETs, hold, and then -INCLUDE (creates multiple variables)
or
2)hold and then -READ (creates multiple values to use with a single variable)


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Virtuoso
posted Hide Post
Darin,

Yes. It seems a bit of a roundabout way. Nonetheless, it would depend on what you want to achieve. If, for instance you do want multiple variables, I would say that, not having a loop would make the -INCLUDE more efficient.
In any case it is good to know that WF allows for interesting program generation by creating DM commands in a file and then including them, dynamically.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 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     load field's value into a variable

Copyright © 1996-2020 Information Builders