Visual Cobol - File Status 9/181

[Migrated content. Thread originally posted on 12 September 2011]

Hi,
I have installed the trial version R4 to test the upgrade from NetExpress to Visual Cobol.

When the program is startet via .bat-job, produces each open-command a file status 9/181 (open input and open output).

Has anyone an idea?

Georg
  • We will need some more detailed information.

    Did you recompile the Net Express program for native code or for .NET managed code?
    What is the program actually doing when it is being started from the .bat file.
    You state that the error occurs when running from a batch job, does this mean that it runs correctly from within the IDE?

    What operation is actually being performed that returns a status 9/181?
    Are your files locatable by the program?

    Thanks.
  • Hi Chris,

    thanks for your answer!

    I compiled the program for native code and console application.

    The job is running in a DOS-window.

    All files are defined by "assign to external". The file-status "9/181" is returned form each OPEN (in- and output). For output-files, the files are created by the program (or DOS?) in the folder, but a later WRITE in a file return file-status "48".

    I never run the job from the IDE, because I am not "fit" in this ;-)

    A further phenomenon is that the cblrtsm.dll must lie in the folder, where the "program.exe" is.
    Perhaps there is another missing dll?

    Georg
  • Hi Chris,

    thanks for your answer!

    I compiled the program for native code and console application.

    The job is running in a DOS-window.

    All files are defined by "assign to external". The file-status "9/181" is returned form each OPEN (in- and output). For output-files, the files are created by the program (or DOS?) in the folder, but a later WRITE in a file return file-status "48".

    I never run the job from the IDE, because I am not "fit" in this ;-)

    A further phenomenon is that the cblrtsm.dll must lie in the folder, where the "program.exe" is.
    Perhaps there is another missing dll?

    Georg
  • How are you compiling the programs if you are not using the Visual Studio 2010 IDE?
    Are you using the command line along with the cobol or cbllink commands?

    If the files are assign to external then how are you setting the environment variables before you run?
    The errors that you are receiving sem to indicate that the environment variables are not being set properly.

    If cblrtsm.dll cannot be found unless it is in the current folder then your PATH must not be set to point to the Visual COBOL 2010\bin folder.

    You should try running this in a Visual COBOL 32-bit command prompt so that it sets the PATH properly.
    You can find this from the start menu-->All Programs-->Micro Focus Visual COBOL 2010-->Tools

    All of this would be much easier if you were to use Visual Studio 2010 to create a new project containing your programs and then build and debug within the IDE itself.

    Thanks.
  • Chris Glazier originally wrote:
    How are you compiling the programs if you are not using the Visual Studio 2010 IDE?
    Are you using the command line along with the cobol or cbllink commands?


    I compiled the program within the IDE in a new projekt. The job runs in a dos-box to simulate the further run-time environment.

    If the files are assign to external then how are you setting the environment variables before you run?
    The errors that you are receiving sem to indicate that the environment variables are not being set properly.


    Please contact me via e-mail hans-georg.decker@kzvk.de Then I can send you the bat file, as attachments in the forum are not allowed.

    If cblrtsm.dll cannot be found unless it is in the current folder then your PATH must not be set to point to the Visual COBOL 2010\bin folder.

    You should try running this in a Visual COBOL 32-bit command prompt so that it sets the PATH properly.
    You can find this from the start menu-->All Programs-->Micro Focus Visual COBOL 2010-->Tools


    I have tried it within the Visual COBOL 32-bit - box and the cblrtsm.dll-problem is fixed. :-)

    All of this would be much easier if you were to use Visual Studio 2010 to create a new project containing your programs and then build and debug within the IDE itself.

    Thanks.
  • I have sent to you a private e-mail asking you to send required materials so that I can reproduce the problem.

    Thanks.
  • I have the drive for the files from the network drive G: changed to the local hard disk C:. Now it works fine!

    Is there a runtime-problem Visual Cobol with Novell?

    Georg
  • I have the drive for the files from the network drive G: changed to the local hard disk C:. Now it works fine!

    Is there a runtime-problem Visual Cobol with Novell?

    Georg
  • We are currently investigating this issue off-line and we will update the post when issue has been resolved.

    Thanks.