Solved

Accessing a BTree File System using Java

Posted on 2012-04-12
6
892 Views
Last Modified: 2013-11-13
We use an RTISAM database structure, basically a BTree file system.  We access it now using Unix and Fortran, but I'm curious to know if the data can be accessed using Java and if anyone has any idea on where to get information to do this?  I'm not too familiar with how the database keys work, but would love to learn more about that.
0
Comment
Question by:cscpaymaster
  • 3
  • 2
6 Comments
 
LVL 5

Expert Comment

by:dcesari
ID: 37841253
Can you please give more details on how you access this database from Fortran? Do you use language extensions of some proprietary compiler or standard Fortran statements (for filesystem access?!?!), or some API (external library)?
0
 

Author Comment

by:cscpaymaster
ID: 37842295
Using Procomm Plus command line editor in Unix and standard FORTRAN 77 and 90 commands.  Files are in a directory (two files - one .rec and one .ind) that are accessed remotely.  Calls are made to open and close files on logical file units.  Records are accessed via keys (I assume these are in the index file) and once the right key is located, the associated record's information can be accessed by loading the data into an array.  The data is actually segmented into 'words' and/or bits.  I'm fairly new at this, so I hope this is the info you were looking for.  Because these are files that I can't actually open and look at, I may not be explaining it well.
0
 
LVL 5

Expert Comment

by:dcesari
ID: 37842635
From your information I guess these .rec and .ind are Fortran unformatted files, probably .rec is of direct-access type. Anyway there is no(t much) magic in unformatted Fortran files, you simply have to look at the Fortran code and emulate that I/O in java using some kind of binary I/O functions. This is a translate/rewrite-of-code exercise, which reasonably has to be done by hand.

If you attach some examples of OPEN/READ/WRITE Fortran statements used I can say something more.
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

Author Comment

by:cscpaymaster
ID: 37842922
Open a file, array 'DATA' is set to 48 size:
8     CALL OPNEMP(5,'FILENAME',6,ICODE)
      KEY(1)=0
      KEY(2)=0
      KEY(3)=' 1'
      CALL GET$$(5,DATA,KEY,0,ICODE)
      IF (ICODE.NE.0) CALL STOP$('08',2)
...then I can use DATA(1) thru DATA(48) as variable values.  For example, DATA(19) is formated as 15A2, which is 30 alpha characters containing a customer name.  So in my code, I can type CALL MOVE$(DATA(19),CONAME,15)), effectively assigning the value of DATA(19) to the variable CONAME and then use CONAME as I wish to print it to the screen, store it in another array, etc.

The record that I am retreiving is based on the value in KEY, which is an array of length 3 - in this case, the value in KEY(3) of ' 1' brings me to a specific record.

Does this help explain?
0
 
LVL 25

Accepted Solution

by:
Tomas Helgi Johannsson earned 500 total points
ID: 37849287
Hi!

http://www.javaforge.com/wiki/66061

Is this something you could use ?

Regards,
     Tomas Helgi
0
 

Author Comment

by:cscpaymaster
ID: 37849294
Yes, Tomas, thank you.  This is very helpful.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now