ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Error Using Correlation Name - A Qualified Name is not allowed in this context

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

  • Error Using Correlation Name - A Qualified Name is not allowed in this context

    Hi, All.

    Using embedded SQL in RPGLE. I'm trying to do this:

    EXEC SQL SELECT x.IBMREQD INTO :val
    FROM SYSIBM/SYSDUMMY1 x;

    SEU highlights the first line and tells me:

    A qualified name is not allowed in this context.

    What am I missing? This should be easy, since I appear to be the only one in the history of the Internet with this problem.

    Thanks.
    Jason

  • #2
    Re: Error Using Correlation Name - A Qualified Name is not allowed in this context

    Just drop the "x" & "x." for starters
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

    Comment


    • #3
      Re: Error Using Correlation Name - A Qualified Name is not allowed in this context

      Originally posted by jamief View Post
      Just drop the "x" & "x." for starters
      Hi. Thanks.

      I was attempting to use an example that provides a simplified illustration of the use of correlation names and qualified column names that isn't working for me. While they are not necessary in this particular example, they are necessary in real life, so I need to figure out why it's not working here. Or are correlation names just not supposed to work in RPGLE embedded SQL?

      Comment


      • #4
        Re: Error Using Correlation Name - A Qualified Name is not allowed in this context

        Hi

        Change your source type to SQLRPGLE

        Comment


        • #5
          Re: Error Using Correlation Name - A Qualified Name is not allowed in this context

          Originally posted by jasonholladay
          SEU highlights the first line and tells me:

          A qualified name is not allowed in this context.
          Your example statement gives no SEU error for me on i 6.1 when pasted into a SQLRPGLE source member. The above advice to set the member type seems like a good first guess. Then again, I get a different error if I paste into a RPGLE member.

          What is the message ID of the error message? (It seems to be RNF0622, but the same message text can be part of different message IDs and have different causes.)
          Tom

          There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

          Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

          Comment


          • #6
            Re: Error Using Correlation Name - A Qualified Name is not allowed in this context

            Originally posted by dhanuxp View Post
            Hi

            Change your source type to SQLRPGLE
            It is already set to that. That was my first adventure, which I managed to resolve myself

            Comment


            • #7
              Re: Error Using Correlation Name - A Qualified Name is not allowed in this context

              Aha! If I bypass the SEU whining and compile the program, there is no error.

              We are on V5R4. What are the chances that it's an SEU issue that's been fixed? Or is there some setting that I'm missing somewhere?

              Comment


              • #8
                Re: Error Using Correlation Name - A Qualified Name is not allowed in this context

                I am wondering what you want to do with IBMREQD from that table?

                This works fine for me, but why do this.
                Hunting down the future ms. Ex DeadManWalks. *certain restrictions apply

                Comment


                • #9
                  Re: Error Using Correlation Name - A Qualified Name is not allowed in this context

                  Originally posted by DeadManWalks View Post
                  I am wondering what you want to do with IBMREQD from that table?

                  This works fine for me, but why do this.
                  I don't actually want to do this. This is a minimal example specifically crafted to not require anyone to implement any additional infrastructure. Always using correlation names in SQL is a good practice, and is required in instances where the same column name appears in different tables in a join. The example is intended to focus on the fact that SEU seems to be choking on qualified column names for me.

                  Comment


                  • #10
                    Re: Error Using Correlation Name - A Qualified Name is not allowed in this context

                    But again, what is the error message ID? The error doesn't indicate a SQL problem (if it's RNF0622). And come to think of it, what is your cume PTF level?
                    Tom

                    There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors.

                    Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?

                    Comment

                    Working...
                    X