Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Copy 3 files with 1 MFD into 1 file
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Copy 3 files with 1 MFD into 1 file
 Login/Join
 
Member
posted
I have 3 files (file a file b fiel c) with same master file definition. Files are FOC type. MFD has few define fields.

How to copy 3 files into 1 file. So that the new FOC file will be used with same MFD.

File a , file b and file c should be copied into file a. So that file a has it's data + file b and c data


Thanks

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


mainframe focus FOCUS 7.1.1
Mainframe OS 390
Excel,csv
 
Posts: 7 | Registered: September 28, 2009Reply With QuoteReport This Post
Expert
posted Hide Post
Since they are FOCUS files, you can use the USE statement to concatenate the 3 data bases. You can find documentation on this in the MVS/TSO Guide to Operations chapter of a mainframe FOCUS manual.
USE
file-1 AS mastername
file-2 AS mastername
file-3 AS mastername
END

You can then issue a TABLE request against the mastername and HOLD the output into another file which you must pre-allocate using the DYNAM ALLOC statement. Doc for that is in the same chapter.

Happy reading!


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Reply With QuoteReport This Post
Gold member
posted Hide Post
I assume you are talking about mainframe files? If so, why not just concatenate the 3 files in your allocation? That way, you can process them as if thjey were one file. If you need to actually have just one file, simply do this concatenation with some utility program, and copy to a new output file.


Diptesh
WF 7.1.7 - AIX, MVS
 
Posts: 79 | Location: Warren, NJ, USA | Registered: October 25, 2006Reply With QuoteReport This Post
Member
posted Hide Post
If I want to prepare a test file or back up file, I use ICEGENER OR IEBGENER to copy into another file with same space and size of source file.

Here copying 3 files into 1 files using utility may not help because of the pointers in data.

I will try USE...and see what happens.


mainframe focus FOCUS 7.1.1
Mainframe OS 390
Excel,csv
 
Posts: 7 | Registered: September 28, 2009Reply With QuoteReport This Post
Expert
posted Hide Post
These are FOCUS files. You cannot use a utility. You must use USE.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Reply With QuoteReport This Post
<JG>
posted
Ginny is quite correct and showed how to do it in the second post to the thread.

For FOCUS databases you must issue a USE statement assigning all the files to the same logical name.
(beware the 2 gig limitation)

To use your new FOCUS file with the original master clear the existing USE and issue a new one
associating the new file with it.
 
Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Couldn't you use the rebuild utility to do this?
1. Rebuild / dump for file b (dump b's contents)
2. Rebuild / load for file a (include b's contents into a)
3. Rebuild / dump for file c (dump c's contents)
4. Rebuild / load for file a (include c's contents into a)
5. Rebuild / rebuild for file a (reorganize file a)
Look up the exact syntax for the Rebuild command.

This will only work correctly if the files have exactly the same segment and field names and if the files do not have equal key values.


GamP

- Using AS 8.2.01 on Windows 7 - IE11.
in Focus since 1988
 
Posts: 1960 | Location: Netherlands | Registered: September 25, 2007Reply With QuoteReport This Post
Member
posted Hide Post
GamP, I will try Rebuild now as I am learning will try everything.

I tried USE and got sucess after fixing format issues.

I couldn;t save the file after query on Master File with HOLD AS FORMAT FOCUS.


So I saved the data into HOLD file. Then used
create file
Modify file
match field
nomatch include
match include

This way I was able to create one folcus file with 3 focus files data.


mainframe focus FOCUS 7.1.1
Mainframe OS 390
Excel,csv
 
Posts: 7 | Registered: September 28, 2009Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Copy 3 files with 1 MFD into 1 file

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.