Solved

Accessing a BTree File System using Java

Posted on 2012-04-12
6
909 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
Industry Leaders: 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!

 

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

Industry Leaders: 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

Suggested Solutions

Title # Comments Views Activity
Java 8 to Java 6 8 33
junit example issue 2 26
$_GET call between URL 3 41
Java array 10 61
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 …
A company’s centralized system that manages user data, security, and distributed resources is often a focus of criminal attention. Active Directory (AD) is no exception. In truth, it’s even more likely to be targeted due to the number of companies …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

749 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