title: Create iSeries command that accepts an object name as a parameter
body: <p>I'm trying to create a new command on an iSeries, where one of the parameter has to be a file name using the standard LIBRARY/FILE MEMBER syntax, something like</p>
  
  <pre><code>MYCMD FILE(MYLIB/MYFILE MYMEMBER)
  </code></pre>
  
  <p>or even</p>
  
  <pre><code>MYCMD FILE(MYLIB/MYFILE) MEMBER(MYMEMBER)
  </code></pre>
  
  <p>I tried to :</p>
  
  <ul>
  <li>Create a PARM statement using the FILE parameter with a *CHAR type</li>
  <li>Create a special type using ELEM statements</li>
  </ul>
  
  <p>But I can't find how to create a parameter that accepts a value that is a qualified object name, like the FROMFILE parameter used with CPYTOIMPF.</p>
  
  <p><em>UPDATE</em></p>
  
  <p>JamesA's answers works fine, but somehow I get two extra characters in my CL's variable :</p>
  
  <p><strong>CMD</strong></p>
  
  <pre><code>            PARM       KWD(FILE) TYPE(FNAME) PROMPT('CL +                  
                           source' 1)                                        
  FNAME:      ELEM       TYPE(FILE) PROMPT('File')                        
              ELEM       TYPE(*NAME) LEN(10) PROMPT('Source +                
                           member')                                          
  FILE:       QUAL       TYPE(*NAME) LEN(10)              
              QUAL       TYPE(*NAME) DFT(*CURLIB) SPCVAL(*CURLIB) PROMPT('Library') LEN(10) MIN(0)           
  </code></pre>
  
  <p><strong>CL</strong></p>
  
  <pre><code>PGM        PARM(&amp;PFIC &amp;OUTFILE &amp;CODEPAGE)        
  DCL        VAR(&amp;PFIC) TYPE(*CHAR) LEN(32)        
  DCL        VAR(&amp;LIB) TYPE(*CHAR) LEN(10)         
  DCL        VAR(&amp;FILE) TYPE(*CHAR) LEN(10)        
  DCL        VAR(&amp;MEMBER) TYPE(*CHAR) LEN(10)      
  
  CHGVAR     VAR(&amp;FILE) VALUE(%SST(&amp;PFIC 3 10))  
  CHGVAR     VAR(&amp;LIB) VALUE(%SST(&amp;PFIC 13 10))              
  CHGVAR     VAR(&amp;MEMBER) VALUE(%SST(&amp;PFIC 23 10))     
  </code></pre>