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     Variables from a data source

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Variables from a data source
 Login/Join
 
Platinum Member
posted
I need to take some data from a table for example:
TABLE FILE CAR
PRINT
COUNTRY
on table save as ...
END

For each country then i need to get data from a table. I need to write a query for each table.
So how do i store Country as an &field.
How do i read the saved file and navigate record by record?

I AM DOING SOMETHING LIKE THIS:
-* File readfile.fex
FILEDEF PASS DISK C:
-RUN

TABLE FILE EMPDATA
PRINT
DIV
ON TABLE SAVE AS PASS
END
-RUN
-TYPE &LINES

-REPEAT LAB1 &LINES TIMES
-TYPE INSIDE
-READ PASS &DIV.A4.
-RUN
-TYPE &DIV
-LAB1
-TYPE OUTSIDE

but for the number of records i get only the first DIV printed . so bsically CORP gets printed 41 times...how do i move to the next record in the file?

This message has been edited. Last edited by: Karanth,
 
Posts: 109 | Registered: January 31, 2006Report This Post
<Special-K>
posted
You should be using BY not PRINT, e.g. if EMPDATA is

DIV

AAA ...
AAA ...
BBB ...
BBB ...
CCC ...
CCC ...

you'll get six records output via PRINT and DIV will repeat as above, use BY and you'll get

AAA ...
BBB ...
CCC ...
 
Report This Post
Member
posted Hide Post
Remove the -RUN and try again. Normally -RUN closes files...
 
Posts: 21 | Location: South Africa | Registered: April 22, 2005Report This Post
Master
posted Hide Post
HERE is an easier way

TABLE FILE CAR
PRINT COUNTRY
WHERE COUNTRY EQ 'ENGLAND'
ON TABLE SAVE AS TMP1 FORMAT ALPHA
END

TABLE FILE CAR
PRINT COUNTRY CAR MODEL RETAIL_COST
WHERE COUNTRY IN FILE TMP1
END




Scott

 
Posts: 865 | Registered: May 24, 2004Report This Post
Expert
posted Hide Post
use the NOCLOSE command
-READ MYFILE NOCLOSE &MYVAR.A8
NOCLOSE allows the file to stay open and go on to the next record when you loop back to the -READ statement.
works for -WRITE as well.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Platinum Member
posted Hide Post
Thanks for your messages. I removed the RUN and it worked.
 
Posts: 109 | Registered: January 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     Variables from a data source

Copyright © 1996-2020 Information Builders