File Handler behavior in managed code

In native COBOL if you have "SELECT DATA-FILE ASSIGN TO DISK 'OLD\Data.dat'" and "OPEN INPUT DATA-FILE" then the File Handler will look for an environment variable named "dd_OLD" and replace the "OLD" in the SELECT clause literal with the contents of the environment variable (if found). But what happens in managed code? We are getting "File not found". Is the managed-code version of the File Handler looking for "dd_OLD" somewhere other than in the environment, or does this functionality not exist in managed code?
Parents
  • The file handler mapping procedure to environment variables should be identical between native and managed code applications.

    I just tested here using VC 2.3 and it works in a managed code project by setting the dd_OLD environment variable either in the app.config file or directly in the environment of the computer.

    I used:

    select test-file assign to "OLD\testfile.dat"

    and set dd_OLD = C:\temp

    and when I opened the file it correctly found c:\temp\testfile.dat

    What product version are you using?

Reply
  • The file handler mapping procedure to environment variables should be identical between native and managed code applications.

    I just tested here using VC 2.3 and it works in a managed code project by setting the dd_OLD environment variable either in the app.config file or directly in the environment of the computer.

    I used:

    select test-file assign to "OLD\testfile.dat"

    and set dd_OLD = C:\temp

    and when I opened the file it correctly found c:\temp\testfile.dat

    What product version are you using?

Children
No Data