support: Customer Portal
Focused on delivering choice, investment protection and flexibility to organizations with valuable COBOL assets
 

Veryant Knowledge Base
Home > All Categories > Data Access > c-treeACE General > Can I use COBFILEIO to give access to my c-tree files to a Java program?
Question Title 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 File Attachments
There are no attachment file(s) related to this question.
How helpful was this article to you?
User Comments User Comments Add Comment
There are no user comments for this question. Be the first to post a comment. Click Here
Related Questions Related Questions
  1. Are Veryant's isCOBOL JISAM data format the same as Faircom's c-treeRTG?
  2. Why do I get 'ct_init ERROR 19:530:0' trying to work with the c-tree Server?
Article Information Additional Information
Article Number: 326
Created: 2022-04-08 3:30 AM
Rating: No Rating
 
Article Options Article Options
Print Question Print this Question
Email Question Email Question to Friend
Export to Adobe PDF Export to PDF File
Export to MS Word Export to MS Word
Bookmark Article
Subscribe to Article Subscribe to Article
 
Search Knowledge Base Search Knowledge Base



 
 

© Veryant - All Rights Reserved
Veryant and isCOBOL are trademarks or registered marks of Veryant in the United States and other countries. All other marks are the property of their respective owners.