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-treeRTG > 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 510 times so far.
Click Here to View all the questions in c-treeRTG 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. Where do I get additional information about file status 9D?
  2. How do I set up c-tree client/server file access?
  3. Why do I get Internal error 19:133:0 when using c-treeRTG?
  4. Does c-treeRTG support live backup (without needing to get users off the system)?
  5. How do I configure remote file paths when using c-treeACE?
  6. Do you have a simple test program to see if c-treeRTG is working?
  7. To use encryption do I need to set the c-tree config variable before I run ISMIGRATE?
  8. Can I use the same version of c-treeRTG when using different versions of isCOBOL?
  9. Why do I get the error message "faircom.rtg.CtreeEnv.ct_config2(IJJ[Ljava/lang/String;)J" when using c-treeRTG?
  10. 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.