|
|
||||
|
Home |
SAS Helpful HintsA quick method to read in fixed field data.Problem: Reading data from a file usually requires that you specify which variables are to be read from which columns. This is a tedious process and I do not have time to sit around counting columns. Solution: Create an array of variables and a corresponding array of their lengths. Input each line of data as one long character string and loop through the arrays to substring the data into individual variables. With this template you may read several data files quickly by changing the array definitions and filename. Title1 "Reading in Data"; Filename in1 'sample.dat'; Please send your comments and suggestions about this web page to A. Watts (watts@bst.rochester.edu) |
|||
©Copyright University of Rochester Medical Center, 1999-2006. Disclaimer. For questions or suggestions concerning the content of these pages, contact the URMC Webmaster. |
||||