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.
Can some one help me how we can read a master file and compare a value in the master file and append text
i am reading master file FILEDEF master DISK c:/mymaster.mas (APPEND -RUN SET &Text ="some" -REPEAT TOEND WHILE master conatins &Text -WRITE master "abcd" -TOENDThis message has been edited. Last edited by: <Kathryn Henning>,
Siddu, We need a bit more detail of what you are trying to achieve. For example, in your -REPEAT you are not reading your "master" so how can you issue a CONTAINS test.
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, 2006
Thanks for your replies sh98110 and danny, i started to learn focus programming 2 days ago.. what i am trying to accomplish is , i want to read a master file and search for a particular line in the master file and i want to edit (delete or add) some text or add new lines to the master file and save it. I don't know exactly how can i do that. after a lot of struggling i was able to read the master file , but having a hard time comapring the text and modifying it Below is my sample code :-
-SET &ECHO=ALL;
FILEDEF mymaster DISK mymaster.mas (LRECL 150) FILEDEF mymaster DISK mymaster.mas (APPEND -RUN CHECK FILE mymaster1 HOLD AS testholdfile
TABLE FILE mymaster1 PRINT * ON TABLE HOLD AS COMPDEP FORMAT ALPHA END -RUN -SET &MAS_COUNT = &LINES; -REPEAT :MAS_READ FOR &I FROM 1 TO &MAS_COUNT; -READ mymaster &Text.&I.A150 -TYPE text =&Text.&I.A150 -:MAS_READ
From the above code i can read the master file and i can display it using text variable , next i used IF &Text.&I.A150 EQ " some text" to compare it but i am having UNRECOGNIZED COMMAND IF error
how can i modify the when it matches the text , i know java programming we can use if(text ="someText"){ ----logic to modify }
My question is: Why would you want to add or delete lines from a master file? Since it describes your data surely you are going to have a problem if you mess with it.
On the other hand, if you are creating a new master starting with an old one, why not just copy it and then edit the copy?
This is another of those situations where knowing what the fianl objective is would help a lot in providing the most appropriate solution.