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.
I've got a simple problem but haven't done this often enough to know what all the issues are. I wouldn't ask if I wasn't up against a deadline.
I need to read a string from a text file. The string is 20100130. It's the only thing in the file. I've done something similar ON TABLE
I'm sure there are extra things that must be done when reading a file from scratch, but I'm not sure what they are. I've read lots of posts this morning, so far, they provide examples of the READ right after a ON HOLD. I haven't found anything (not sure if it's different) that speaks to using an existing file.
ON TABLE TABLENAME
PRINT FIELD
HOLD AS TEMPNAME FORMAT ALPHA
END
-RUN
-READ TEMPNAME &TEMVAR.A8.
The above works just fine, this is the first time I've tried to read an existing file. Heres what I have so far:
APP FI MAXPOST DISK guidedbi/bi_max_post_date.txt
-READ MAXPOST &MAXDate.A8.
-? &MAX
-EXIT
I get this error message: 0 ERROR AT OR NEAR LINE 3 IN PROCEDURE ADHOCRQ FOCEXEC * (FOC339) DIALOGUE MANAGER -READ FAILED: CHECK FILEDEF OR ALLOCATION FOR: -READ MAXPOST &MAXDate.A8.
Any help would be appreciated.This message has been edited. Last edited by: Kerry,
You may also try substituting FILEDEF for APP FI. I always use the former since it allows to map files not only to application paths under "approot" but also to any physical location.
This should have the same effect as APP FI:
FILEDEF MAXPOST DISK quidedbi/bi_max_post_date.txt
or, in case you need access to a file sitting "anywhere" that is neither a directory under approot nor a mapped directory:
FILEDEF MAXPOST DISK C:\DataFiles\bi_max_post_date.txt
Don't forget the -RUN statement right after the file mapping and before -READ.
Thanks Ginny! I use APP MAP in production reports when there is a need for accessing content outside the regular approot location, that is, until I manage to convince the WF administrator to map those locations directly in the global or user profiles in the Reporting Server.
For a "quick" solution and out of laziness I've taken the not-so-good practice of using FILEDEF to hard-wire the file location there.
You're point is very valid Ginny and using APP MAP should be the way to go for the sake of keeping code that is clean and most importantly maintainable.