SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Reading Variable-Length Records
Reading Variable-Length Fields


Question:
Write an INPUT statement that reads the values for Name using the $VARYINGw. informat. Use the length-variable namelen to define the length of Name in each record, but give the variable Name a maximum length of 10.
     data perm.phones; 
        infile phonedat length=reclen; 
        input ID 4. @;
        namelen=reclen-8;
       

           

  back||next

 

Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement