[Migrated content. Thread originally posted on 25 March 2011]
We are very new at the .net world but have purchased Visual Cobol because it can access our current vision file data without converting the data (so we understand).
Our first issue is that we can't seem to find a way to get a project to see our current vision data files. Can someone please send me some pointers/clues/hints on how you get a new project to see a vision data file.
Thanks for ANY help.
kthomp24 originally wrote:
We are very new at the .net world but have purchased Visual Cobol because it can access our current vision file data without converting the data (so we understand).
Our first issue is that we can't seem to find a way to get a project to see our current vision data files. Can someone please send me some pointers/clues/hints on how you get a new project to see a vision data file.
I guess it sort of depends on what you mean by "see".
If you right click the project name in the solution explorer, the context menu should have an option (about 1/3 of the way down) labeled "Add". Select that then select "Existing Item". You should then see a file picker dialog. On the bottom right corner of that dialog there's a combo box which allows you to specify the mask for files to display. Drop down the combo box so it displays "All Files" and navigate to the folder where your vision data files are and you should be able to select them.
On the other hand if you mean something different by "see" then you need to expand your question a bit.
[Migrated content. Thread originally posted on 25 March 2011]
We are very new at the .net world but have purchased Visual Cobol because it can access our current vision file data without converting the data (so we understand).
Our first issue is that we can't seem to find a way to get a project to see our current vision data files. Can someone please send me some pointers/clues/hints on how you get a new project to see a vision data file.
Thanks for ANY help.
kthomp24 originally wrote:
We are very new at the .net world but have purchased Visual Cobol because it can access our current vision file data without converting the data (so we understand).
Our first issue is that we can't seem to find a way to get a project to see our current vision data files. Can someone please send me some pointers/clues/hints on how you get a new project to see a vision data file.
I guess it sort of depends on what you mean by "see".
If you right click the project name in the solution explorer, the context menu should have an option (about 1/3 of the way down) labeled "Add". Select that then select "Existing Item". You should then see a file picker dialog. On the bottom right corner of that dialog there's a combo box which allows you to specify the mask for files to display. Drop down the combo box so it displays "All Files" and navigate to the folder where your vision data files are and you should be able to select them.
On the other hand if you mean something different by "see" then you need to expand your question a bit.
[Migrated content. Thread originally posted on 25 March 2011]
We are very new at the .net world but have purchased Visual Cobol because it can access our current vision file data without converting the data (so we understand).
Our first issue is that we can't seem to find a way to get a project to see our current vision data files. Can someone please send me some pointers/clues/hints on how you get a new project to see a vision data file.
Thanks for ANY help.
I'll assume by "seeing" these files, you mean you want your programs to use Vision files instead of MF ISAM files. To do this, you need to enable the Vision (Acu) file handler by adding a compiler directive.
Before you do this, you should also know that you can only use ACUFH in a
Native (not
Managed) project. This selection is done when you create the project. I don't know if you can convert an existing Managed-code project to Native, or vice-versa (anyone else want to answer this?).
The directive for using the ACUFH file handler is:
CALLFH("ACUFH")This can be set in Visual Studio in your Project's Properties page (in the COBOL category, under "Additional Directives".
You can also set it for individual programs, by adding it directly in your COBOL source program using a $SET statement. At the top of the program (ahead of the Identification Division) put:
$SET CALLFH("ACUFH")
Identification Division.
* comment
(be sure the $SET starts in column 1 or 7, depending on the type of source format you use. In other words, the same column you put the asterisk for comments).
Also, you may need to set config variables that affect the Vision file handling - what you would have done in ACUCOBOL using a runtime config file (cblconfig). Things like V_VERSION, V_BUFFERS, etc. (I'm not sure what the full list of supported variables is). The ACUFH file handler will look for /etc/cblconfig by default. You can specify your own config file by setting the A_CONFIG environment variable. To do this in your Visual COBOL project, follow these steps:
- In the Solution Explorer, under your project look for a file named Application.config. If it isn't there, add it: right-click the project, select Add -> New Item. In the window that pops up, select Application Configuration File, then click the Add button.
- Double-click the Application.config file. In the small window that pops up, click on the Environment tab. In the Name field, type A_CONFIG and in the Value field type the name of your config file (I called mine "acufh.cfg").
If you don't include a full path to the config file, it will assume the current directory - by default the directory where the VC puts the compiled executable (e.g. workspace\\project\\bin\\x86\\debug). That's also where it will look for (and create) data files. If you want to keep them in a different directory, you can set your project's working directory explicitly. Open the Project's Properties, click on the
Debug category, then under
Start Options you can set your working directory. You can put a fully-qualified path, but this could prevent your project from being portable (if you want to move it, or share a copy with someone). The path, however, appears to be relative to the Project directory, so if you want the working directory to be the Workspace directory just put ".." in the Working Directory field (to indicate the parent directory of the project, which is the workspace). At least it seemed to work for me - Your Mileage May Vary!
[Migrated content. Thread originally posted on 25 March 2011]
We are very new at the .net world but have purchased Visual Cobol because it can access our current vision file data without converting the data (so we understand).
Our first issue is that we can't seem to find a way to get a project to see our current vision data files. Can someone please send me some pointers/clues/hints on how you get a new project to see a vision data file.
Thanks for ANY help.
You will also have to add a reference to link in the ACUFH.LIB import library.
The location for this file is C:\\Program Files (x86)\\Micro Focus\\Vision 2.0\\lib or lib64 depending on if you are compiling for 32-bit or 64-bit.
You can add this to the LIB environment variable or you can reference it under Properties->COBOL->Link Settings->Link to these Libraries.
[Migrated content. Thread originally posted on 25 March 2011]
We are very new at the .net world but have purchased Visual Cobol because it can access our current vision file data without converting the data (so we understand).
Our first issue is that we can't seem to find a way to get a project to see our current vision data files. Can someone please send me some pointers/clues/hints on how you get a new project to see a vision data file.
Thanks for ANY help.
In Native mode you lose the ability to use windows forms and .net GUI screen building....is that correct? So if we wanted to use that type of screen building we are not able to attach/view/access Vision file formatted data?
[Migrated content. Thread originally posted on 25 March 2011]
We are very new at the .net world but have purchased Visual Cobol because it can access our current vision file data without converting the data (so we understand).
Our first issue is that we can't seem to find a way to get a project to see our current vision data files. Can someone please send me some pointers/clues/hints on how you get a new project to see a vision data file.
Thanks for ANY help.
In Native mode you lose the ability to use windows forms and .net GUI screen building....is that correct? So if we wanted to use that type of screen building we are not able to attach/view/access Vision file formatted data?
[Migrated content. Thread originally posted on 25 March 2011]
We are very new at the .net world but have purchased Visual Cobol because it can access our current vision file data without converting the data (so we understand).
Our first issue is that we can't seem to find a way to get a project to see our current vision data files. Can someone please send me some pointers/clues/hints on how you get a new project to see a vision data file.
Thanks for ANY help.
It is true that currently the Acu Vision File support is only available in native COBOL applications but these applications, if compiled as .dlls can be called from a managed code application such as a Winform application using a .NET technology known as Platform Invoke.
Visual COBOL does most of the required work under the covers so you can call these native applications as if they were any typical COBOL subprogram using a linkage section and procedure division using header to pass parameters.
So if you had a native .DLL named TESTSUB.DLL which looked like:
id division.
program-id. TESTSUB.
working-storage section.
01 pass-param pic x(20).
procedure division using pass-param.
*> access Vision files and pass back data.
goback.
this could be accessed in the managed code application using the standard:
call "TESTSUB" using pass-param
TESTSUB.dll should be placed in the same location as the main .EXE of the application so that it can be found.
Also, look at the ILPINVOKE compiler directive for more information.
There is also a small sample program that demonstrates this functionality.
Please see C:\\Users\\Public\\Documents\\Micro Focus\\Visual COBOL 2010\\Samples\\pinvoke
Thanks.
[Migrated content. Thread originally posted on 25 March 2011]
We are very new at the .net world but have purchased Visual Cobol because it can access our current vision file data without converting the data (so we understand).
Our first issue is that we can't seem to find a way to get a project to see our current vision data files. Can someone please send me some pointers/clues/hints on how you get a new project to see a vision data file.
Thanks for ANY help.
How do we convert our AcuCobol .acu compiled code to a .dll?
[Migrated content. Thread originally posted on 25 March 2011]
We are very new at the .net world but have purchased Visual Cobol because it can access our current vision file data without converting the data (so we understand).
Our first issue is that we can't seem to find a way to get a project to see our current vision data files. Can someone please send me some pointers/clues/hints on how you get a new project to see a vision data file.
Thanks for ANY help.
How do we convert our AcuCobol .acu compiled code to a .dll?
[Migrated content. Thread originally posted on 25 March 2011]
We are very new at the .net world but have purchased Visual Cobol because it can access our current vision file data without converting the data (so we understand).
Our first issue is that we can't seem to find a way to get a project to see our current vision data files. Can someone please send me some pointers/clues/hints on how you get a new project to see a vision data file.
Thanks for ANY help.
How do we convert our AcuCobol .acu compiled code to a .dll?
[Migrated content. Thread originally posted on 25 March 2011]
We are very new at the .net world but have purchased Visual Cobol because it can access our current vision file data without converting the data (so we understand).
Our first issue is that we can't seem to find a way to get a project to see our current vision data files. Can someone please send me some pointers/clues/hints on how you get a new project to see a vision data file.
Thanks for ANY help.
There is no conversion utility available to take .acu code and turn it into .dlls.
You will need to create a Visual Studio 2010 native COBOL Link Library project and import your source code programs into it.
You would then need to build the project and the resultant output file generated is a .dll.
How much manual conversion of source code from Acu to Visual COBOL that will be necessary depends entirely on what Acu features you are using in these programs.
[Migrated content. Thread originally posted on 25 March 2011]
We are very new at the .net world but have purchased Visual Cobol because it can access our current vision file data without converting the data (so we understand).
Our first issue is that we can't seem to find a way to get a project to see our current vision data files. Can someone please send me some pointers/clues/hints on how you get a new project to see a vision data file.
Thanks for ANY help.
Using the suggestions here, we were able to successfully access Vision Files from a managed project, by calling a native Cobol program which actually does the file access. This works okay, but we've been unable to access files using remote name notation (files stored on our server and accessible via AcuServer). Is access to AcuServer files via remote name notation not supported in Visual Cobol? (since it's just an extension of the Acu File Handling, I thought it would be?).
[Migrated content. Thread originally posted on 25 March 2011]
We are very new at the .net world but have purchased Visual Cobol because it can access our current vision file data without converting the data (so we understand).
Our first issue is that we can't seem to find a way to get a project to see our current vision data files. Can someone please send me some pointers/clues/hints on how you get a new project to see a vision data file.
Thanks for ANY help.
Hi Tony,
No, currently AcuServer is not part of the Visual COBOL suite and is not included in the ACUFH libraries which is the Vision File handler that is part of Visual COBOL.
We're not sure if AcuServer or File Share would be the best way to access remote Vision files going forward. Please send your thoughts on this to Dominique Sacre and Mark Warren.
Thanks,
Steve
[Migrated content. Thread originally posted on 25 March 2011]
We are very new at the .net world but have purchased Visual Cobol because it can access our current vision file data without converting the data (so we understand).
Our first issue is that we can't seem to find a way to get a project to see our current vision data files. Can someone please send me some pointers/clues/hints on how you get a new project to see a vision data file.
Thanks for ANY help.
Thanks, Steve - by "File Share", are you referring to a Windows file share of a folder over a network? If so, that won't work for us as we use AcuServer over the Internet.
(removed second question as it was user error......... works fine in VC)
[Migrated content. Thread originally posted on 25 March 2011]
We are very new at the .net world but have purchased Visual Cobol because it can access our current vision file data without converting the data (so we understand).
Our first issue is that we can't seem to find a way to get a project to see our current vision data files. Can someone please send me some pointers/clues/hints on how you get a new project to see a vision data file.
Thanks for ANY help.
Having successfully been able to use Vision files from the WinBook project (by creating ReadBook, a copy of LegacyBook which uses ACUFH and is a native Cobol project, with the necessary changes to BookWrapper), I tried to use the WebBook tutorial. The page creates fine, but when I try to access the data file, I get an error "173 Called program file not found in drive/directory [ReadBook]". The ReadBook.dll is in the BIN folder of the WebForm project, same folder as BookWrapper, and BookWrapper is called okay.
Is the web page able to use a native Cobol program (ie native Cobol READBOOK called from managed program BookWrapper)?
Does this error message indicate that "ReadBook" can't be found, or that the error occurred within ReadBook.dll?
[Migrated content. Thread originally posted on 25 March 2011]
We are very new at the .net world but have purchased Visual Cobol because it can access our current vision file data without converting the data (so we understand).
Our first issue is that we can't seem to find a way to get a project to see our current vision data files. Can someone please send me some pointers/clues/hints on how you get a new project to see a vision data file.
Thanks for ANY help.
In the tutorial "creating web forms in Cobol", the following statement appears re the provided Book sample program:
Existing COBOL program, the Book program. This program simulates a pre-existing COBOL program, which contains the business logic and which remains unchanged. This program is supplied and this tutorial adds it to the Web Site so that it is recompiled as managed code and exposed as a class that can be called by .NET managed code without needing any changes to the source.
The seems to imply that only managed code can be called by the web page - which precludes the use of Vision files, since the ACUFH handler is only supported in Native Cobol projects?
[Migrated content. Thread originally posted on 25 March 2011]
We are very new at the .net world but have purchased Visual Cobol because it can access our current vision file data without converting the data (so we understand).
Our first issue is that we can't seem to find a way to get a project to see our current vision data files. Can someone please send me some pointers/clues/hints on how you get a new project to see a vision data file.
Thanks for ANY help.
TonyLeBlanc originally wrote:
Thanks, Steve - by "File Share", are you referring to a Windows file share of a folder over a network? If so, that won't work for us as we use AcuServer over the Internet.
(removed second question as it was user error......... works fine in VC)
Hi Tony,
Fileshare is a MicroFocus product, in many ways similar to AcuServer. If accessing remote Vision files through Visual COBOL is important to you and your team, please let Mark Warren and Dominique Sacre know.
www.microfocus.com/.../23865_tcm21-13340.pdfSteve
[Migrated content. Thread originally posted on 25 March 2011]
We are very new at the .net world but have purchased Visual Cobol because it can access our current vision file data without converting the data (so we understand).
Our first issue is that we can't seem to find a way to get a project to see our current vision data files. Can someone please send me some pointers/clues/hints on how you get a new project to see a vision data file.
Thanks for ANY help.
Hi Tony,
When running an ASP.NET application you are running under the control of either the Visual Studio File Web Server or under IIS. Both of these environments require that if you are calling unmanaged "native" programs that the folder containing the native program be specified within the PATH.
Please add the bin folder containing the native program to your system PATH under Control Panel and then reboot your computer and try to call it again.
Thanks.
[Migrated content. Thread originally posted on 25 March 2011]
We are very new at the .net world but have purchased Visual Cobol because it can access our current vision file data without converting the data (so we understand).
Our first issue is that we can't seem to find a way to get a project to see our current vision data files. Can someone please send me some pointers/clues/hints on how you get a new project to see a vision data file.
Thanks for ANY help.
Thanks, Chris, that worked.
Am I missing some documentation that would answer a lot of these questions?
[Migrated content. Thread originally posted on 25 March 2011]
We are very new at the .net world but have purchased Visual Cobol because it can access our current vision file data without converting the data (so we understand).
Our first issue is that we can't seem to find a way to get a project to see our current vision data files. Can someone please send me some pointers/clues/hints on how you get a new project to see a vision data file.
Thanks for ANY help.
A lot of these types of issues can be found by searching our knowledgebase at
Micro Focus KnowledgebaseIf you don't find what you are looking for in the product documentation or in the knowledgebase then posting your question here is the best way forward...
[Migrated content. Thread originally posted on 25 March 2011]
We are very new at the .net world but have purchased Visual Cobol because it can access our current vision file data without converting the data (so we understand).
Our first issue is that we can't seem to find a way to get a project to see our current vision data files. Can someone please send me some pointers/clues/hints on how you get a new project to see a vision data file.
Thanks for ANY help.
Continuing our testing/learning of VC using Vision files - we have a Vision file that was created with compression, but VC doesn't like the SELECT statement:
SELECT ORDER-FILE
ASSIGN TO RANDOM , "OMORD.DAT"
WITH COMPRESSION
COMPRESSION IS 100
ORGANIZATION IS INDEXED
ACCESS MODE IS DYNAMIC
LOCK MODE IS MANUAL
RECORD KEY IS ORD-INV-NUM-KEY
ALTERNATE RECORD KEY IS ORD-ACCOUNT-JOB-KEY
etc
The "COMPRESSION IS 100" statement is being rejected by VC. Are there options with Vision files that aren't supported by the VC Vision file handler, or am I missing something?
[Migrated content. Thread originally posted on 25 March 2011]
We are very new at the .net world but have purchased Visual Cobol because it can access our current vision file data without converting the data (so we understand).
Our first issue is that we can't seem to find a way to get a project to see our current vision data files. Can someone please send me some pointers/clues/hints on how you get a new project to see a vision data file.
Thanks for ANY help.
Another issue we've run into - in our Acu Vision files, we have data saved as COMP-1. I'm writing a program to allow access to one of our files in a manner similar to the WinBook sample application - I have a native Cobol program which does the actual file IO, and it compiles fine with the COMP-1 data items.
However, the Wrapper program (similar to BookWrapper),which is a managed program, gives an error COBCH0229 "Incompatible qualifiers". I've tried using SIGNED-INT and COMP instead of COMP-1, but the data format is different. What's the equivalent USAGE in Visual Cobol to maintain compatibility with the COMP-1 data items in Acu?
[Migrated content. Thread originally posted on 25 March 2011]
We are very new at the .net world but have purchased Visual Cobol because it can access our current vision file data without converting the data (so we understand).
Our first issue is that we can't seem to find a way to get a project to see our current vision data files. Can someone please send me some pointers/clues/hints on how you get a new project to see a vision data file.
Thanks for ANY help.
The Acu COMP-1 default is a 16-bit signed integer which should be the same as PIC S9(4) COMP I believe.
Give it a try and see if this is compatible...
[Migrated content. Thread originally posted on 25 March 2011]
We are very new at the .net world but have purchased Visual Cobol because it can access our current vision file data without converting the data (so we understand).
Our first issue is that we can't seem to find a way to get a project to see our current vision data files. Can someone please send me some pointers/clues/hints on how you get a new project to see a vision data file.
Thanks for ANY help.
Chris Glazier originally wrote:
You will also have to add a reference to link in the ACUFH.LIB import library.
The location for this file is C:\\Program Files (x86)\\Micro Focus\\Vision 2.0\\lib or lib64 depending on if you are compiling for 32-bit or 64-bit.
You can add this to the LIB environment variable or you can reference it under Properties->COBOL->Link Settings->Link to these Libraries.
Chris (or other Micro Focus person),
I am trying to do the above. But the Properties->COBOL->Link Settings button is disabled. Please let me know how to make that available, or please give me the exact spec on the LIB setting for the environment. In other words:
a) must I specify my LIB variable in the system's environment variables from the windows system settings (in Vista)? Or
b) Can I specify my LIB variable in Visual COBOL, in the same dialog where I set other MF variables (like dd_myfile)?
And please be specific how to set the LIB variable, with this exact location for acufh.dll:
C:\\Program Files\\Micro Focus\\Vision 2.0\\lib
My understanding is that I only need to put the directory into LIB. But it has not worked no matter how I specify it.
Thanks!
Dan
[Migrated content. Thread originally posted on 25 March 2011]
We are very new at the .net world but have purchased Visual Cobol because it can access our current vision file data without converting the data (so we understand).
Our first issue is that we can't seem to find a way to get a project to see our current vision data files. Can someone please send me some pointers/clues/hints on how you get a new project to see a vision data file.
Thanks for ANY help.
Chris Glazier originally wrote:
You will also have to add a reference to link in the ACUFH.LIB import library.
The location for this file is C:\\Program Files (x86)\\Micro Focus\\Vision 2.0\\lib or lib64 depending on if you are compiling for 32-bit or 64-bit.
You can add this to the LIB environment variable or you can reference it under Properties->COBOL->Link Settings->Link to these Libraries.
Chris (or other Micro Focus person),
I am trying to do the above. But the Properties->COBOL->Link Settings button is disabled. Please let me know how to make that available, or please give me the exact spec on the LIB setting for the environment. In other words:
a) must I specify my LIB variable in the system's environment variables from the windows system settings (in Vista)? Or
b) Can I specify my LIB variable in Visual COBOL, in the same dialog where I set other MF variables (like dd_myfile)?
And please be specific how to set the LIB variable, with this exact location for acufh.dll:
C:\\Program Files\\Micro Focus\\Vision 2.0\\lib
My understanding is that I only need to put the directory into LIB. But it has not worked no matter how I specify it.
Thanks!
Dan