Topic
5 replies Latest Post - ‏2013-09-26T20:07:37Z by jcdelmo
Tony@First Data
Tony@First Data
7 Posts
ACCEPTED ANSWER

Pinned topic PLI program scan error with file name of 'LOCATE'

‏2013-09-20T22:18:54Z |

Have several PL/I programs that use the filename of LOCATE for a file.  Both scanners give the program a RC=8 with the message of TYPE-PLI AES1004E Found unsupported syntax 'LOCATE' in line 12.  Has anyone found a work around for this besides changing the file name?

  • TonyLlopis
    TonyLlopis
    59 Posts
    ACCEPTED ANSWER

    Re: PLI program scan error with file name of 'LOCATE'

    ‏2013-09-24T01:45:06Z  in response to Tony@First Data

    Could you post a few lines of the code around the file reference ?   

    I can see that LOCATE is a language keyword.   Can you try to copy the LOCATE file to anther name and alter the source to it to be sure it is the keyword LOCATE that causes the problem ?

    Other than that, are you positive that the syntax is correct ?   Do not get me wrong.  I have seen a many errors like this, with good syntax and bad syntax.  I am asking because I often see situations where the change management system is hiding syntax errors around include statements.    A rather common problem when the change management system mounts the source before giving it to the compiler.    I have seen plenty of COBOL COPY statements with a missing period at the end, but the syntax error never gets reported because it never gets to the compiler.    Is there a change management system in the way ?   Which one.   But the more I think about it, normally things like the lazy dropping of periods and such in include statements would have showed up in random places, and this is focused around the use of LOCATE, so I think is probably an RAA keyword tolerance issue.  

    Also, when dealing with syntax errors in situations like this, there are times when playing with different language level scan options under the Proprietary Scanner may solve the problem.   I doubt this is the case, but it is worth trying.       

    Updated on 2013-09-24T13:14:45Z at 2013-09-24T13:14:45Z by TonyLlopis
    • Tony@First Data
      Tony@First Data
      7 Posts
      ACCEPTED ANSWER

      Re: PLI program scan error with file name of 'LOCATE'

      ‏2013-09-24T20:54:43Z  in response to TonyLlopis

      Here are the declare lines that are causing the issue.

      /********************************************************************/
      /*  FILE DECLARES                                                   */
      /********************************************************************/
      declare                                                              
         ldtin      FILE RECORD INPUT,        /* Input Linedata File      */
         locate     FILE RECORD,              /* Location File            */
         address    FILE RECORD,              /* Address File             */
         sysprint   FILE STREAM OUTPUT ENV    /* Report file              */
                         ( F RECSIZE( 80 ) );                              

       

      The error goes away when I change every occurance of locate to locat1.

      /********************************************************************/
      /*  FILE DECLARES                                                   */
      /********************************************************************/
      declare                                                              
         ldtin      FILE RECORD INPUT,        /* Input Linedata File      */
         locat1     FILE RECORD,              /* Location File            */
         address    FILE RECORD,              /* Address File             */
         sysprint   FILE STREAM OUTPUT ENV    /* Report file              */
                         ( F RECSIZE( 80 ) );                              

       

      • TonyLlopis
        TonyLlopis
        59 Posts
        ACCEPTED ANSWER

        Re: PLI program scan error with file name of 'LOCATE'

        ‏2013-09-24T22:39:35Z  in response to Tony@First Data

        I see...    Sorry, I will have to defer to the IBM team for the final opinion on this issue.     How many programs do you have that are affected by this ?

        • Tony@First Data
          Tony@First Data
          7 Posts
          ACCEPTED ANSWER

          Re: PLI program scan error with file name of 'LOCATE'

          ‏2013-09-25T13:17:51Z  in response to TonyLlopis

          We currently have 6 programs are coded using LOCATE as a file name.

      • jcdelmo
        jcdelmo
        343 Posts
        ACCEPTED ANSWER

        Re: PLI program scan error with file name of 'LOCATE'

        ‏2013-09-26T20:07:37Z  in response to Tony@First Data

        RAA work item 42157 has been open for this issue.   The reserved work LOCATE (for the LOCATE statement) should be allowed as a declaration name in PLI.

        It currently is not.