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
Solved

Accessing a BTree File System using Java

Posted on 2012-04-12
6
904 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
in SAS how to create a record for each combination of the two duplicates? 16 104
printf performancy 11 69
Java Eclipse Loop 3 20
BATCH to EXE Converter 2 35
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

860 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