myITforum and Windows IT Pro Forums
Forum Themes:
Welcome !

 prototype

Author Message
Toasty

  • Total Posts : 4
  • Scores: 0
  • Reward points : 590
  • Joined: 12/1/2016
  • Status: offline
prototype Thursday, December 01, 2016 2:22 PM (permalink)
0
Hi All,
I was on a 5 year hiatus from the iSeries, at my new programming position they use prototypes quiet a bit and I am having trouble getting past my error on the prototype.  I compiled the 2 programs before I made changes so I know they compiled correctly.  I had to add 1 new parm, which I called mdj.  I think I have all the required code on my attachment.  My problem is I can't get the first program to compile cleanly,  I am getting the error on the mdj field I added.  Below are the errors I am receiving.  Any help would be greatly appreciated,  Thanks
 *RNF5410 30      2 The prototype for the call is not defined.              
 *RNF7030 30      1 The name or indicator is not defined.
 *RNF7503 30      5 Expression contains an operand that is not defined.       
Attachment(s)prototype.txt (1.78 KB) - downloaded 56 times
 
#1
    chrismhayden

    • Total Posts : 16
    • Scores: 0
    • Reward points : 8250
    • Joined: 9/11/2015
    • Location: Jacksonville, Florida
    • Status: offline
    Re:prototype Thursday, December 01, 2016 2:40 PM (permalink)
    0
    your parms are named different
    one place it's called MDJPARM
    one place it's called MDJAPPL
    where the field is defined as 1A try prompting, think the position is incorrect
    man....how did you find an job in iSeries after being gone for five years
    can't find any jobs where I live....Florida
    feel free to send me emails with programming questions 
    have you tried FREE FORMAT RPG code instead of fixed column
      
      
     
    <message edited by chrismhayden on Thursday, December 01, 2016 3:10 PM>
     
    #2
      Toasty

      • Total Posts : 4
      • Scores: 0
      • Reward points : 590
      • Joined: 12/1/2016
      • Status: offline
      Re:prototype Friday, December 02, 2016 1:31 PM (permalink)
      0
      chrismhayden


      your parms are named different
      one place it's called MDJPARM
      one place it's called MDJAPPL
      where the field is defined as 1A try prompting, think the position is incorrect
      man....how did you find an job in iSeries after being gone for five years
      can't find any jobs where I live....Florida
      feel free to send me emails with programming questions 
      have you tried FREE FORMAT RPG code instead of fixed column
       
       
      Thanks Chris, I will try what you suggested.
      We do RPG Free here for anything new, but we are so busy there is only 2 of us, any changes we don't take the time to convert.
      I tried a network job, reason for my iSeries absence, and hated it.  I jumped at the chance to go back when I saw this job and I am glad I did.  I think my 25 years of experience and my knowledge of the industry helped.  I guess the grass is not always greener on the other side! 
       
       
      #3
        chrismhayden

        • Total Posts : 16
        • Scores: 0
        • Reward points : 8250
        • Joined: 9/11/2015
        • Location: Jacksonville, Florida
        • Status: offline
        Re:prototype Friday, December 02, 2016 2:31 PM (permalink)
        0
        Toasty,
        can you please send me an email at
         
        #4
          jsev

          • Total Posts : 24
          • Scores: 2
          • Reward points : 42120
          • Joined: 11/19/2015
          • Status: offline
          Re:prototype Sunday, December 04, 2016 4:25 PM (permalink)
          0
          I don't agree with the previous poster regarding the different names.  A prototype is telling the system the details of the parameters that are being passed.  You can use any name you like on a prototype as they aren't actually used (they're only used to help describe the field - you don'have to add a name) - it's the parameter lengths that are important there.
           
          The procedure interface defines the variables that are used in your program that are passed as parameters.  The lengths in the PR need to match your PI definitions.  As such, I'd recommend using the LIKE keywords to define the prototype definitions where possible e.g.
           
           D CSG1000012      PR
           D idparm                              Like(masterid#p)
           ...
            
           or:
           D CSG1000012      PR
           D                                     Like(masterid#p)
           ...
            

          It's difficult to assist much as the errors you have shown are just the generic errors from the end of the compiler listing.  If you look at the end of the source code in this listing, you'll get more details on the specifics of the errors.
          The first error message is saying the prototype is not defined.  Is it definitely this particular prototype?  In the compiler listing, are any errors shown below the prototype definition?
          For "the name or indicator is not defined" error - the compile listing should say which name is not defined after the source listing.  That could be anything as it could be the result of a typo.  Note though, you have added names to the prototype but this is not defining variables so they need to be defined elsewhere.  As per my previous comment, using LIKE in the prototype means you only need to define the lengths/types in one spot.
           
           
          #5
            Toasty

            • Total Posts : 4
            • Scores: 0
            • Reward points : 590
            • Joined: 12/1/2016
            • Status: offline
            Re:prototype Tuesday, December 13, 2016 12:38 PM (permalink)
            0
            jsev


            I don't agree with the previous poster regarding the different names.  A prototype is telling the system the details of the parameters that are being passed.  You can use any name you like on a prototype as they aren't actually used (they're only used to help describe the field - you don'have to add a name) - it's the parameter lengths that are important there.

            The procedure interface defines the variables that are used in your program that are passed as parameters.  The lengths in the PR need to match your PI definitions.  As such, I'd recommend using the LIKE keywords to define the prototype definitions where possible e.g.

             
             D CSG1000012      PR 
             D idparm                              Like(masterid#p) 
             ... 
             
             or: 
             D CSG1000012      PR 
             D                                     Like(masterid#p) 
             ... 
             

            It's difficult to assist much as the errors you have shown are just the generic errors from the end of the compiler listing.  If you look at the end of the source code in this listing, you'll get more details on the specifics of the errors.
            The first error message is saying the prototype is not defined.  Is it definitely this particular prototype?  In the compiler listing, are any errors shown below the prototype definition?
            For "the name or indicator is not defined" error - the compile listing should say which name is not defined after the source listing.  That could be anything as it could be the result of a typo.  Note though, you have added names to the prototype but this is not defining variables so they need to be defined elsewhere.  As per my previous comment, using LIKE in the prototype means you only need to define the lengths/types in one spot.


            The error is definitely for this prototype, the prototype is called twice.  These are the detailed error messages. 
             *RNF7030 30        023601  The name or indicator MDJ is not defined.
             *RNF7503 30        023601  Expression contains an operand that is not defined.
             *RNF7503 30        024700  Expression contains an operand that is not defined.
             *RNF5410 30        024500  The prototype for the call is not defined.    
            *RNF7503 30        037000  Expression contains an operand that is not defined.      
            *RNF7503 30        054001  Expression contains an operand that is not defined.       
             *RNF7503 30        056301  Expression contains an operand that is not defined.
             *RNF5410 30        056100  The prototype for the call is not defined.  
             
            Line 024500 and 056100 are the call to the prototpe.
             
             024500     callp StatsCRUD(masterid#:castype:atty:start:plead:money:
             024600       arb:class:addldate:arbapp:xferin:react:  
             024700       disp:disptype:user:function:found:mdj);    
             
            I have this error in the compiled listing:
             *RNF7030 MDJ               **UNDEF**              023900M     025000      036700      053300M                                                    
             055600                                               
              MDJAPEALERR       N(1)                   005400D     034300M     039400M     044800M     
             
            MDJ is clearly defined in the compile listing though:
            003600+d  found                          n         
            003700+d  mdj                           1a    
             
             
             
             
             
            #6
              jsev

              • Total Posts : 24
              • Scores: 2
              • Reward points : 42120
              • Joined: 11/19/2015
              • Status: offline
              Re:prototype Wednesday, December 14, 2016 3:22 PM (permalink)
              0
              Your original attachment doesn't show mdj as being defined.  I see mdjappl being defined in the CSG1000012 PI, but not mdj so I guess that is defined elsewhere, from a /include by the looks.
              You say that MDJ is clearly defined however, you've only shown a partial list of the definition and all that shows is a D spec which isn't enough to determine if this is defining a variable or if it's just a label in a PR parameter definition.  I suspect you are still confusing the two.
              As previously mentioned, a PR does NOT define your variables.  PRs define the interface and the parameter types/lengths that is expected to be parsed, a name there is optional and is NOT a variable name.  It is more for documentation type purposes.  Are you able to supply the complete listing where mdj is defined?
               
               
              #7
                Toasty

                • Total Posts : 4
                • Scores: 0
                • Reward points : 590
                • Joined: 12/1/2016
                • Status: offline
                Re:prototype Tuesday, December 20, 2016 11:29 AM (permalink)
                0
                I finally took the time to look at the compile listing and figured out my problem.  There was another /copy program I had to add the parm, all the parm definitions are in this program.  Thanks for all the help!
                 
                #8
                  Online Bookmarks Sharing: Share/Bookmark

                  Jump to:

                  Current active users

                  There are 0 members and 1 guests.

                  Icon Legend and Permission

                  • New Messages
                  • No New Messages
                  • Hot Topic w/ New Messages
                  • Hot Topic w/o New Messages
                  • Locked w/ New Messages
                  • Locked w/o New Messages
                  • Read Message
                  • Post New Thread
                  • Reply to message
                  • Post New Poll
                  • Submit Vote
                  • Post reward post
                  • Delete my own posts
                  • Delete my own threads
                  • Rate post

                  2000-2017 ASPPlayground.NET Forum Version 3.9