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] can't figure out -READ (dash READ)

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[Solved] can't figure out -READ (dash READ)
 Login/Join
 
Silver Member
posted
In an unrelated text file, I have a value of a field on every record that I want to use when doing a TABLE FILE against a SQL table. I was thinking I could do a -READ to get that one field/value and have it end up in the output of the TABLE FILE (along with other data from that SQL table).

But I’m not having much luck with the -READ. I never got to the TABLE FILE, but when I do a -TYPE (to verify I have the correct value) after the -READ, I either get an error like:

(FOC339) DIALOGUE MANAGER -READ FAILED: CHECK FILEDEF OR ALLOCATION FOR: SFA_HOLD1

or, I get the very first field in that unrelated text file instead of the field I’m interested in.

I’ve searched focal point, along with some PDF docs on the tech support website, but I haven’t figured this out yet. I've used a couple different formats of that initial, unrelated file, but that hasn't helped.

Any suggestions would be appreciated.

Thanks,

Mark

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


WF 8.2.02
App Studio
DataMigrator
ReportCaster
Windows Server 2016
 
Posts: 42 | Registered: September 08, 2003Report This Post
Virtuoso
posted Hide Post
Folkie

How is this file created? Do you create it using ON TABLE HOLD? Please post your code.

Without seeing your code try the latest and greatest

-READFILE SRA_HOLD1

This message has been edited. Last edited by: FP Mod Chuck,


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Expert
posted Hide Post
When searching the online documentation pages, exclude the hyphen from your search.

Use this link.

The fifth one down (in my returned list anyway) will probably be the better one for you.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Silver Member
posted Hide Post
Chuck,

Sorry, I got sidetracked....

The original file (which has the field I want to use) was created via an Excel macro which output some fields from the spreadsheet into a text file. When I couldn't get the -READ to work with that text file, I used WF on that text file to create a focus table. When the focus table didn't work with the -READ, I created an FTM file via WF (I don't quite remember, but I think that was ON TABLE HOLD FORMAT ALPHA). But I couldn't figure out -READ with the FTM file either.

I haven't tried Tony's suggestion/link yet, but I noticed there (& previously), there's a -READ and -READFILE. What's the difference between those two? I've tried both, but I've mostly been trying -READ.

Thanks,
Mark


WF 8.2.02
App Studio
DataMigrator
ReportCaster
Windows Server 2016
 
Posts: 42 | Registered: September 08, 2003Report This Post
Virtuoso
posted Hide Post
http://webfocusinfocenter.info...pdfs4/wfappslang.pdf

Page 432


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Virtuoso
posted Hide Post
Folkie

No matter which one you use if the HOLD file is not created as part of the fex where you do the -READ or -READFILE you need to filedef the master file for the hold file. Your ON TABLE HOLD FORMAT ALPHA is the best way to create the file. With that syntax the name of the HOLD file will simply be hold.ftm with a corresponding hold.mas. If you want to name the HOLD file use ON TABLE HOLD AS SRV_HOLD FORMAT ALPHA using whatever name you want after the AS. If you are creating the HOLD file outside the fex where you are doing the -READ you should also add APP HOLD appfoldername so it saves the files in what ever appfolder you use. It is really best to create the hold file in the same fex as the -READFILE so you don't have to worry about the APP HOLD or FILDEDF's

With -READ you have to list each field and field length that is in the file with -READFILE you don't have to, it will create &variables based on the field names in the master file.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
 
Posts: 2127 | Location: Customer Support | Registered: April 12, 2005Report This Post
Silver Member
posted Hide Post
I guess I just needed to re-read these posts and links and the -READ syntax several times before it sunk in. I didn’t realize I had to list every master file field on the -READ statement. I was just listing the couple fields I was interested in. But after putting all the fields from the master file on the -READ statement, I was able to TYPE the fields I was interested in.

I also tried the -READFILE. With that, I apparently didn’t need to list all the fields (or any fields). But when I ran it, I got the auto-prompt for every field that I wanted to TYPE. Maybe if I first used the -DEFAULT (mentioned in the info about -READ but I didn't really understand it) it may have prevented the auto-prompt, but I didn’t bother trying that.

I haven’t tried the ultimate test yet (using a couple fields from that text file in a TABLE FILE) but I’ll assume I can do that now that I’ve got the -READ working with the -TYPE.

Thanks for all your suggestions,
Mark


WF 8.2.02
App Studio
DataMigrator
ReportCaster
Windows Server 2016
 
Posts: 42 | Registered: September 08, 2003Report 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] can't figure out -READ (dash READ)

Copyright © 1996-2020 Information Builders