Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

OPNQRYF SELECT option not giving the right output

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • OPNQRYF SELECT option not giving the right output

    Specify the SHARE(*YES) parameter on your OVRDBF command. Dave

  • #2
    OPNQRYF SELECT option not giving the right output

    I would also suggest changing OPTION(*ALL) to OPTION(*INP). Your CL program will be able to open the file only in input mode. Having the OPNQRYF opened in a different mode will most likely cause your CL to read the physical file in QTEMP, not the query file.

    Comment


    • #3
      OPNQRYF SELECT option not giving the right output

      Having the OPNQRYF opened in a different mode will most likely cause your CL to read the physical file in QTEMP, not the query file. Is this behavior documented somewhere? I find this difficult to believe. However, I would recommend using *INP too. Regards. Chris

      Comment


      • #4
        OPNQRYF SELECT option not giving the right output

        Thanks to everyone. The share option will do the trick.

        Comment


        • #5
          OPNQRYF SELECT option not giving the right output

          Chris, I'm not sure about the documentation. I have experienced this problem when using OPTION(*INP) and opening the file I-O in my HLL. I'm not sure if the reverse would cause a problem. To be safe, I would always make sure the OPTION matches the open. You do get a helpful message in your joblog when this happens, letting you know that the SHARE(*YES) on your OVRDBF was ignored. Mark

          Comment


          • #6
            OPNQRYF SELECT option not giving the right output

            Why is this query did not erase the input records of file QTEMP/TONTMP after reading it and output the same query result(output records) to the same file QTEMP/TONTMP. During RCVF it will give me a record with column 3 equals "T" instead of "0" (zero) to "9" (nine) only. Thanks
            Code

            Comment


            • #7
              OPNQRYF SELECT option not giving the right output

              My "Open Query File Magic" books says not to specify *INP and then call a HLL that updates the file. It does say that you can specify *ALL and then call a HLL that only defines the file as input only. Chris

              Comment

              Working...
              X