ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Issue with Dcl-Pi being used for my parameter list

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Issue with Dcl-Pi being used for my parameter list

    Hey Everybody!

    I was hoping someone might be able to figure out what is going wrong with my Parameter (Dcl-PI) list below. The program is by no means done but, in it's current state, the error below hinders me from moving forward. The code under the title "Plist" are the respective lines in which the error occurs. I've used Dcl-Pi for parameter lists before and never had this issue. I am still very green to RPG so i'm sure this something super simple. If anyone sees anything else that I need to change, please do not hesitate to tell me! Thanks a ton guys.

    Multiple markers at this line
    - "FSC_DclProc" expected instead of this input
    - "P E" or "END-PROC" (procedure end) inserted to complete scope




    PHP Code:
          *------------------------------------------------------------------------*
          *------------------------------------------------------------------------*
          *
    Files
           Dcl
    -F FOECADD DISK(*EXTkeyed Usage(*INPUT);
          *------------------------------------------------------------------------*
          *------------------------------------------------------------------------*
          *
    Standalones
           Dcl
    -S ACCT#                   CHAR(7);         //grabs PARM(ACCT#PARM)
          
    *------------------------------------------------------------------------*
          *------------------------------------------------------------------------*
          *
    Data Structures
           Dcl
    -DS keyFOECADD likerec(ADREC:*KEY);
                  
    keyFOECADD.KADDNAME ADBKNM;        //Primary Key  FOECADD
                  
    keyFOECADD.KADKEY1 ADKEY1;                //Secondary Key  FOECADD
          
    *------------------------------------------------------------------------*
          *------------------------------------------------------------------------*
          *
    Plist
           Dcl
    -Pi FOECADDRPG ExtPgm;
             
    ACCT#PARM           Char(5);
           
    End-Pi;
          *------------------------------------------------------------------------*

           
    //MAINLINE PROCESSING
           
    /Free
            ACCT
    # = '%' + ACCT#PARM + '%';
            
    keyFOECADD = *BLANKS;

            
    EXEC SQL
              SELECT ADBKNM
    ,ADKEY1 into :keyFOECADD
                FROM FOECADD
                WHERE ADKEY1 like 
    :ACCT#;








           
    *InLR = *On;
           /
    End-Free 

  • #2
    Looks like Dcl-Pi needs to be entered before my data structure!

    Comment

    Working...
    X