title: Why do I have to specify an ExtPgm parameter for the Main Procedure?
body: <p>My program, PKGDAYMONR has the control option:</p>
  
  <pre><code>ctl-opt Main( CheckDailyPackages )
  </code></pre>
  
  <p>The CheckDailyPackages procedure has the following PI:</p>
  
  <pre><code>dcl-pi *n ExtPgm( 'PGMNAME' );
  </code></pre>
  
  <p>As you can see the <code>ExtPgm</code> parameter is not the name of the program.  In fact, it’s what came over in the template source and I forgot to change it.  Despite the wrong name in <code>ExtPgm</code>, the program runs without a problem.</p>
  
  <p>If I remove that parameter and leave the keyword as just <code>ExtPgm</code>, I get the following message:</p>
  
  <blockquote>
    <p>RNF3573: A parameter is required for the EXTPGM keyword when the
    procedure name is longer than 10.</p>
  </blockquote>
  
  <p>If I drop <code>ExtPgm</code> from the Procedure Interface altogether, it also complains:</p>
  
  <blockquote>
    <p>RNF3834: EXTPGM must be specified on the prototype for the MAIN()
    procedure.</p>
  </blockquote>
  
  <p>So why is it that I have to specify a parameter if it doesn't matter what value I enter?</p>
  
  <p>O/S level: IBM i 7.2</p>