title: Formatting output file after an INCLUDE condition in JCL
body: <p>I want to create 3 outfiles depending on the below INCLUDE criteria from the input file. In addition I want only part of the record in the output file given by the below 3 BUILD's.</p>
  
  <p>The issue now I think is that having multiple BUILD/OUTREC gives a duplicate error.</p>
  
  <p>Is there any other way of achieving the same in JCL?</p>
  
  <pre><code>SORT  FIELDS=COPY                                              
  OUTFIL FILES=01,                                               
     INCLUDE=(38,8,CH,EQ,C'AMSAM00'),                            
     BUILD=(1,4,5:366,8)                                         
  OUTFIL FILES=02,                                               
     INCLUDE=(38,8,CH,EQ,C'AMSAM00',AND,390,1,CH,EQ,C'Y'),       
     BUILD=(1,4,5:382,8)                                         
  OUTFIL FILES=03,                                               
     INCLUDE=(38,8,CH,EQ,C'AMSAM00',AND,545,4,CH,NE,C'0000'),    
     BUILD=(1,4,5:C'013,',9:545,4) 
  </code></pre>