Err Msg 13l file not found

I am using MF Visual Cobol v 2.2. ( Personal Edition)

When my progam tries to open an input file, I get  "Error Msg   -----13     File not found"

This input sequential file (.dat extension)  is created in Net Express 5.1. 

Is this because of compatibility issue between Net Express and Visual Cobol v 2.2 ?

OR is there anywhere I have missed to create path for input file?

Thanks

Kumar

  • Verified Answer

    What is the physical file name that you are assigning to in the program?

    If you are not using a full path but only assigning to a filename then there may be a problem with locating the file in Visual COBOL.

    One difference between NX and VC when running in the IDE's that in NX the project folder is the current working directory when you start your application and in VC it is the output folder of the project.

    So if you use  SELECT TEST-FILE ASSIGN TO "MYFILE.DAT"

    In NX it would be looking for this file in the project folder and in VC it would be looking for it in the output folder which by default would be something like \projfolder\bin\x86\debug and not in \projfolder itself.

    You can change the working directory when you run your program in the VC IDE on the project properties page-->Debug tab-->Working Directory.

    If you are assigning to an environment variable in your select statement then you must ensure that it is set within the IDE either by adding it to an app.config file or within the Environment section of the project properties-->Application tab prior to running the program.

  • Thanks Chris,

    As sugeested by you, I changed the working directory  in the VC IDE on the project properties page-->Debug tab-->Working Directory. This solved my problem.

    Regards

    Kumar