I'm trying to import a text file where some of the records for a variable are more than 700 characters long.
Proc import procedure is setting a length of 500 for that variable and my output dataset has those records being cut-off at 500th character.
Is there any way to solve this without adding a data step to the proc import??
Depending on your SAS version, there is a GUESSINGROWS= option, if you want SAS to interrogate more than the default number of rows. The SAS support website http://support.sas.com/ has product DOC and technical paper resources, and a SEARCH facility to find topic related info. I have provided a few links below to related items from the support site.
For the variable TSVAL , I need the length to be 700.
I've copied the above program and changed the format and informat for TSVAL and it worked..
Is there any way that I can do this in PROC IMPORT STEP without adding the datastep. This is beacause, we are using the proc import step in a macro and we didn't want to have the set of variables that are in the data step.
It's not a feature of proc import from a text file.
If you have predictable problems like that 500/700, then you probably have enough information to define the max column lengths and any special informats to be used like dates. With that information your macro needs only define which layout type is relevant and apply that.
Honestly, I would consider this to be a limit/defect for PROC IMPORT -- one that you may want to pursue with SAS Tech Support by opening a track. At least get it logged with them that you are dissatisfied with the PROC IMPORT handling of column data greater than 500 characters.