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     1 MFD 2 files. How to access both?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
1 MFD 2 files. How to access both?
 Login/Join
 
Silver Member
posted
In MF production we have 2 FOCUS files (A & B) both described with the same MFD - ERRORS. I want to update B with the data from A (B will have all of today's A data plus all of the prior A's for a month). I want to avoid 1) an unnecessary table file/hold to do the update or 2) the creation on a 2nd production MFD just for this step.

I could copy the MFD to a new name in a Proc step, do a MODIFY and erase it but, I'm looking for a more elegant (cooler) solution.

Any ideas? Maybe not even a MODIFY

Thanks,

Sandy
 
Posts: 38 | Location: Chicago, IL area | Registered: June 16, 2004Report This Post
<Pietro De Santis>
posted
The elegant way is to use the USE command.

USE CLEAR *
USE ERRORSA AS ERRORS
-RUN

TABLE FILE ERRORS
...
END

USE CLEAR *
USE ERRORSB AS ERRORS
-RUN

MODIFY FILE ERRORS
...
END
 
Report This Post
Silver Member
posted Hide Post
Pietro,

Thanks. I don't want to do a TABLE FILE HOLD and then MODIFY. I want to use A as the DATA FROM file.

Sandy
 
Posts: 38 | Location: Chicago, IL area | Registered: June 16, 2004Report This Post
<Pietro De Santis>
posted
You cannot read the data from one database to modify another database using MODIFY ... DATA ON. The input data files has to be a flat file.

If you want to update one database with data in another database, there are two methods:

The first I have already described. This is the much simpler method.

The second involves having two distinct Masters, COMBINEing the databases, and then writing a fairly complex CASE-based MODIFY to first read data in one database and update the second database.
 
Report This Post
Silver Member
posted Hide Post
Yeah, I know I can't actually use one database to modify another database using MODIFY ... DATA ON. I was sort of showing what I was hoping to do. We just hated the thought of what seems like an unessesary TABLEF.

Here are 2 files, exactly the same structure different record count and no way to combine them without an intermediate R/W step. seemed like it was worth asking around.

Thanks for you help. We'll go back to the TABLEF.

Sandy
 
Posts: 38 | Location: Chicago, IL area | Registered: June 16, 2004Report This Post
Guru
posted Hide Post
Sandy,

there's a third alternative if you've got a Maintain server:

maintain file a and b

case top
get_a_data();
update_b_data();
goto exit;
endcase

case get_a_data
for all next a.field into stk1;
endcase

case update_b_data
for all revise b.field from stk1;
endcase

end

Hakan
 
Posts: 319 | Location: Stockholm, Sweden | Registered: February 04, 2004Report 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     1 MFD 2 files. How to access both?

Copyright © 1996-2020 Information Builders