sponsored links



No announcement yet.

"Wrong" file search in the library list

  • Filter
  • Time
  • Show
Clear All
new posts

  • "Wrong" file search in the library list

    Hello to all. Faced the following unusual behavior.

    The C program opens the file with the member specified. The file location library is not specified. The file with the specified name is in two libraries: the LIBDDM library contains the DDM file, the LIBPF library contains the PF file. The LIBPF library is located after the LIBDDM library in the list of libraries, but the program opens a file from the LIBPF library.

    If you remove the indication of the member when opening, then everything is fine - the file from LIBDDM opens. Also, if you remove the LIBPF library from the list, then the file from LIBDDM also opens without problems (even with a member specified).

    It turns out that before opening a file, the system searches for the "most suitable" file to open. Can you explain why this is happening?

  • #2
    I don't program in C, so I don't know how it resolves library list questions, but this reminds me of how Display Physical File Member (DSPPFM) works.

    If you specify a file and a member, but not a library, DSPPFM displays the first member it finds of the specified name in a file of the specified name, which is not necessarily the first file of that name in the library list. Maybe your C open is doing the same thing. Do the files in the two libraries have the same members or different ones?


    • #3
      I think Mr Holt is correct. As a test, add that file member in the LIBDDM file and try again. The *LIBL is likely being searched for a match on the file and member name.