Highlighted
Absent Member.
Absent Member.
2918 views

Starting with Visual COBOL from RM/COBOL

Jump to solution

Good afternoon. I am currently working with RM/COBOL and we are planning to acquire Visual COBOL, the download for evaluation but so far I can not make an application that uses indexed files.

Therefore I request any help that I can provide, I would serve much any tutorial or in your case a basic project in Visual Studio that handles files.

Thank you...

0 Likes
2 Solutions

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Starting with Visual COBOL from RM/COBOL

Jump to solution

Here is a very simple demo of creating and reading an ISAM file in a native Visual COBOL program.

Let me know if you require something else.

Thanks.

View solution in original post

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Starting with Visual COBOL from RM/COBOL

Jump to solution

Here is a revised version of the demo project which sets IDXFORMAT"21" using a extfh.cfg file.
Note that the file assign has been changed to point to a full path in the DATA subdirectory.

In the program you will see a comment where you could also set IDXFORMAT"21" as a compiler directive instead of using an EXTFH.CFG file.

The current EXTFH.CFG file looks like:

[XFH-DEFAULT]
BASENAME=ON
[testfile.dat]
IDXFORMAT=21

The BASENAME=ON option is necessary so that we can specify the file tag without using a full path to the filename.

We could have also set this to the folder name so that all files in that folder would be IDXFORMAT"21" by using the following:

[FOLDER:C:\\ISAMDemoNative\\ISAMDemoNative\\DATA]
IDXFORMAT=21

View solution in original post

0 Likes
6 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Starting with Visual COBOL from RM/COBOL

Jump to solution

Are you trying to read RM indexed files or just trying to create Visual COBOL standard indexed files?

Are you using native projects or .NET managed code projects?

I will attach a demo project but I want to ensure that it covers what it is that you are trying to do.

What exactly is the problem that you are experiencing?

Thanks.

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Starting with Visual COBOL from RM/COBOL

Jump to solution

Here is a very simple demo of creating and reading an ISAM file in a native Visual COBOL program.

Let me know if you require something else.

Thanks.

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Starting with Visual COBOL from RM/COBOL

Jump to solution

Thank you very much for the help, this is precisely what I needed.

Have a good day

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Starting with Visual COBOL from RM/COBOL

Jump to solution

Your project I have been very helpful, thank you.

Now I would like to know if you have an example using the EXTFH.cfg configuration file already according to what research I need to use it and set the variable IDXFORMAT = 21. I've tried to do and it does not work.

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Starting with Visual COBOL from RM/COBOL

Jump to solution

Here is a revised version of the demo project which sets IDXFORMAT"21" using a extfh.cfg file.
Note that the file assign has been changed to point to a full path in the DATA subdirectory.

In the program you will see a comment where you could also set IDXFORMAT"21" as a compiler directive instead of using an EXTFH.CFG file.

The current EXTFH.CFG file looks like:

[XFH-DEFAULT]
BASENAME=ON
[testfile.dat]
IDXFORMAT=21

The BASENAME=ON option is necessary so that we can specify the file tag without using a full path to the filename.

We could have also set this to the folder name so that all files in that folder would be IDXFORMAT"21" by using the following:

[FOLDER:C:\\ISAMDemoNative\\ISAMDemoNative\\DATA]
IDXFORMAT=21

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Starting with Visual COBOL from RM/COBOL

Jump to solution

Perfect! Thank you very much, I could already use the file correctly.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.