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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Create a Test DB
 Login/Join
 
Member
posted
Can anyone tell me a quick and easy way to create a database on my user ID that mirrors a production database, so that I can use it for testing purposes and would be able to modify data, etc. without corrupting the production environment?

Thanks,
Tasha
 
Posts: 9 | Location: Orlando, FL | Registered: December 11, 2006Report This Post
Virtuoso
posted Hide Post
Can anyone tell me a quick and easy way to create a database ......

Can't answer your question Tasha, however, it would be helpful to know what kind of database you are wanting to create, that would help others to answer. Have a great day.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Member
posted Hide Post
We are running FOCUS 6.8.5 on UNIX. I would like to have a copy of the database that contains product code information (PO's, qty, price, etc.) for the Purchasing Dept. because that's the database my focexecs will run against.

Thanks,
Tasha
 
Posts: 9 | Location: Orlando, FL | Registered: December 11, 2006Report This Post
Expert
posted Hide Post
Can you just copy the db file?
using nothing more complex than a COPY command?
The use the same master
just point the USE statement to the new location.
USE
D:\APPS\SOMEFILE.FOC
END
becomes
USE
D:\APPS\MYTEST\SOMEFILE.FOC
END




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Platinum Member
posted Hide Post
Hi Tasha,
The easiest way to create a test files with WebFOCUS 71 is on the Reporting server console.
Under Metadata, Open an application, Find your Master that you want to create a test file for, Left Click and choose Data Management and you will have options to create the file and load it with test data. This is very quick and easy.
Hope this helps.
Rich


WebFOCUS 8202 Win 2012
Test - WebFOCUS 8203 on Win 2012
 
Posts: 173 | Registered: November 16, 2005Report This Post
Expert
posted Hide Post
Rich,

Wouldn't that recreate the existing database and not create a new one?

Tasha,

All of the above are relevant and will do the job, but I think you should ask yourself what do you want to use the new test database for?

If it is to test existing MODIFY or MAINTAIN procedures or to test timings, change indexes etc. then you will want to have the same RDBMS type.

If it purely to test reports then you could recreate the database as a FOCUS table by using -

APP HOLD application_folder_name
TABLE FILE existing_db
PRINT *
ON TABLE HOLD AS test_db FORMAT FOCUS
END

It really depends on what you want to test.

T

This message has been edited. Last edited by: Tony A,



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
Platinum Member
posted Hide Post
quote:
Wouldn't that recreate the existing database and not create a new one?


LOL

Hi Tony,
Yes. Sorry I forgot to mention that IF your are doing this ON a production machine you definitely would want to CHANGE the name to reflect that it's a TEST db.
Thanks for pointing that out.
Rich


WebFOCUS 8202 Win 2012
Test - WebFOCUS 8203 on Win 2012
 
Posts: 173 | Registered: November 16, 2005Report This Post
Member
posted Hide Post
Hi,

We're not using WebFOCUS, we're using mainframe (ver 6.8 on UNIX (Sun)).

What I'd like to do is create a mirror image of a production database (maybe Purchasing DB) and keep it in a directory on my own user ID (maybe call it TestPurchase). I would like to take maybe a third of the data from production and load it into this test DB to start off with, so that there are less records. Then I would like to use this test database so that I can test my focexecs (table requests, modifies, joins) against it to make sure they're working properly. I've only been using FOCUS for about three weeks, so I'm really not proficient in it at all, and I only have a Repoting manual to use as a reference.

Also, if I want to modify some of the data so that I can specifically test for certain conditions, what is the easiest way to do that? (I haven't written a "Modify" yet, so I can't be sure that would work) Can I create a flat file from existing data, and then just edit the flat file to change the data fields I want to change, then insert those records into the table?

Thanks,
Tasha
 
Posts: 9 | Location: Orlando, FL | Registered: December 11, 2006Report This Post
Virtuoso
posted Hide Post
APP HOLD application_folder_name
TABLE FILE existing_db
PRINT *
ON TABLE HOLD AS test_db FORMAT FOCUS
END

You can add in here if RECORDLIMIT EQ 1000
To see some data.

Or and If statment that said
IF COMPANY_NUMBER EQ 100.

You can create any kind of subset of data and hold it as a Focus File and use it.


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Expert
posted Hide Post
Tasha,

You haven't mentioned what kind of database you're working with. Is it DB2, Oracle, or are they FOCUS databases?

To clarify Prarie's very good suggestion, you could create a new application directory in the IBI Apps directory, use the APP HOLD command to point to this new directory, run the TABLE command to create the FOCUS database and Master. Then, in any subsequent requests, you could add the APP PREPEND command to "prepend" the newly created directory to the FOCUS APP PATH. In this way, the FOCUS databases and Masters you just created would be found before the real, Prod ones, as long as you use the same names.
APP PREPENDPATH application_folder_name


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
There are several ways to update a FOCUS database in a mainframe environment - FSCAN, SCAN, MODIFY. FSCAN and SCAN are utilities and MODIFY is FOCUS programming code.

Have you found the documentation for your version of FOCUS on the IBI Docs website?

After logging-in, these two links will get you to two volumes of documentation for FOCUS 6.5 (I'm not sure why 6.8 is not available). Right-click on the PDF icons and save the files to your PC.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
newbie, yes to all your questions, if i read your correctly; your thinking seems to be perfect; you do need to have a MODIFY manual, before you set out to do what you propose, and as Francis says, go to the ibi support website and download it.
Assuming you have write access to whatever area you're wanting to create your testdb in, you can
create a test db out of your source db a couple of ways, depending on what works, and depending on what your master looks like.
If you have , say, 5000 granular records in your source and you want only 2000 in your test, you can
1.make a copy of your source master file description, rename it something like TESTDB,
2. TABLE out 2000 records from your source db into a flat file and load them into your TESTDB exactly as you had planned.
The MODIFY manual will give you lots of good examples: Here's one simple one just to give you an idea that goes along with your thinking
COPY CAR.MAS MYCAR.MAS
TABLE FILE CAR
IF RECORDLIMIT IS 10 (or however many, or someother filter you might like)
PRINT whatever
BY keyfield1 BY keyfield2 ...
ON TABLE HOLD AS MYDATA FORMAT ALPHA
END
-* your source flat file should be in the same order as your keys in your receiving db
USE
wherever\MYCAR.FOC NEW
END
CREATE FILE MYCAR
MODIFY FILE MYCAR
FIXFORM FROM MYDATA
MATCH keyfield1 (whatever keys fields define the top segment)
ON NOMATCH INCLUDE
ON MATCH UPDATE fieldname(s) whatever fields are in the top segment
MATCH keyfield2 (the next segment)
..etc
DATA ON MYDATA
END




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
<Parag Khanvilkar>
posted
quote:
that I can test

Hi newbie,

To Copy a focus Mainframe database in Production we can use the ICEGENER Utility for Normal copy of the database under your id as highlevel qualifier, and if the Production and development servers are different we can generally XCOM the database thru servers.

Once this database is in test region u can use Various comments in MODIFY to Change the database for testing Purposes as it will be exact replica of ur production database.
 
Report This Post
Expert
posted Hide Post
The links to the FOCUS for UNIX User's Manuals (2 volumes):

http://documentation.informationbuilders.com/masterinde...detail.asp?docid=833
http://documentation.informationbuilders.com/masterinde...detail.asp?docid=832

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


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders