title: COBOL store file with multiple record types
body: <p>The goal of this exercise is to read and store an input file into a table then validate certain fields within the input and output any error records. The input file that needs to be stored is 285 records. The problem is that each record is different, with it's own copybook, so I don't know how to load it to a table to where I could search each 10, 20, or 32 record for a certain field. Here's a sample of the input file FYI... Not sure if my current code would be needed at this point as there's not much in it except for a READ statement.</p>
  
  <pre><code>10A 018517          2005062520060625                                    
  20A 018517000861038                                                     
  32A 018517                            79372                             
  60A 0185172020                                             6          4 
  94A 018517     080 1                                                    
  10A 027721          2005082520060825                                    
  20A 027721000187062                                                     
  32A 027721                            05038                             
  60A 0277212003                                             6          4 
  94A 027721     090 1                                                    
  ....
  </code></pre>
  
  <p>I was able to load the file into the table, but now my dilemma is how to search each different record field in the table to validate? i.e. how can I validate that the zip code in record 32 is numeric? </p>
  
  <p>I know I could read into the copybook, but I don't how, or if its even possible, to read a file into multiple copybooks and then store it all in a table.. if that makes sense.</p>
  
  <p>Any advice on where to go from here would be greatly appreciated!</p>