title: VSAM Status code 04
body: <p>I am running one COBOL pgm which is reading one VSAM file.
  Below is ithe input output section in my pgm.</p>
  
  <p>FILE-CONTROL.                                                    </p>
  
  <pre><code> SELECT INPUT-FILE         ASSIGN TO DDINPUT             
                             ORGANIZATION IS INDEXED           
                             ACCESS MODE  IS RANDOM            
                             RECORD KEY   IS INPUT-KEY                                
                             FILE STATUS  IS WS-INPUT-STATUS.
  </code></pre>
  
  <p>and FD entry is as follow.</p>
  
  <p>FILE SECTION.                            </p>
  
  <p>FD  INPUT-FILE IS EXTERNAL     (as this is in sub pgm)<br>
      COPY INPUTREC.    </p>
  
  <p>When I ran this pgm, it failed with file status code =04.
  Somewhere I found that when in FD we have only one record even if the file is VB it treats it is FB. So FB should have record contains or Varying clause.</p>
  
  <p>When I updated my FD to.</p>
  
  <p>FILE SECTION.                            </p>
  
  <p>FD  INPUT-FILE IS EXTERNAL<br>
      RECORD VARYING IN SIZE FROM 1 TO 215.
      COPY INPLAYOUT.                       </p>
  
  <p>job ran fine.</p>
  
  <p>I have one doubt Can I specify this Varying clause to maximum length, like if I write this as       eg     RECORD VARYING IN SIZE FROM 1 TO 2500. then will it cause any issue?          </p>