Can I use COBFILEIO to give access to my c-tree files to a Java program? |
Yes, it is possible. Because the isCOBOL runtime framework uses a dynamic file handler and the COBFILEIO generated routines rely on that file handler directly.
The generation and compilation of the COBFILEIO OOP COBOL and Java Exception classes is the same as if you were going to access JISAM files.
It is at runtime that you need to set the following property to access the C-tree file system instead of JISAM:
iscobol.file.index=ctreej
A good way to test this is by using the sample provided with the isCOBOL SDK. It can be found in the sampleis-javajava-uses-cobfileio sub-folder under the isCOBOL SDK installation folder.
Create an iscobol.properties in that folder and include the following lines in it:
iscobol.file.index=ctreej
iscobol.file.prefix=[full path to the test c-tree files folder]
(make sure that folder for the c-tree files exist in advance)
Then use the test-cobfileio.bat under Windows or test-cobfileio.sh under Linux to generate and compile the COBFILEIO classes and run the java test class.
The following screenshot shows how that test can be run. (It has the Javadoc generation commented out to make it simpler.)

|
Authored
by: Veryant Support
This question has been viewed 282 times so far.
|
Click
Here to View all the questions in c-treeACE General
category. |
File Attachments |
There are no attachment file(s) related to this question. |
|
User Comments |
 |
|
There are no user comments for this question. Be the first to post a comment. Click Here |
Related Questions
|
- Are Veryant's isCOBOL JISAM data format the same as Faircom's c-treeRTG?
- Why do I get 'ct_init ERROR 19:530:0' trying to work with the c-tree Server?
|