?
Solved

Accessing a BTree File System using Java

Posted on 2012-04-12
6
Medium Priority
?
933 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

 

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 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Lotus Notes has been used since a very long time as an e-mail client and is very popular because of it's unmatched security. In this article we are going to learn about  RRV Bucket corruption and understand various methods to Fix "RRV Bucket Corrupt…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Suggested Courses

800 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