/**********************************************************************/
/*                         Layout of Raw Data                         */
/*                                                                    */
/*               ----+----1----+----2----+----3----+----4             */
/*               jones     41 male   76 212 2 0                       */
/*               smith     43 male   73 190 3 2                       */
/*               doe       35 female 70 130 1 2                       */
/*                                                                    */
/*                                                                    */
/**********************************************************************/


   /* used to read flat1 file                             */
data info;                                                  
   infile 'userid.sas.v6code(flat1)';                       
   input name $ 1-10                                        
         age    11-12                                       
         sex  $ 14-19                                       
         ht     21-22                                       
         wt     24-26                                       
         cars   28                                          
         chldrn 30;                                         
run;                                                        


/**********************************************************************/


   /* used to create raw data file                        */
data _null_;                                                
   file 'userid.flat(flatfile)' lrecl=36 blksize=36;        
   set info;                                                
   put name    $10.                                         
       age     ib4.                                         
       sex     $6.                                          
       ht      pib4.                                        
       wt      rb4.                                         
       cars    zd4.                                         
       chldrn  pd4.;                                        
run;


/**********************************************************************/


data read_raw;                         
   infile 'c:\bslash raw_file' recfm=u;
   input name    $ebcdic10.
         age     s370fib4. 
         sex     $ebcdic6. 
         ht      s370fpib4.
         wt      s370frb4. 
         cars    s370fzd4. 
         chldrn  s370fpd4.;
run;                       


/**********************************************************************/