You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently tried to import a CSV-file with one column name missing and I tried doing that with your CSV2DS macro.
It resulted in an error.
The following statement, in the data step that creates TYPES, solves that problem and doesn't impact the way the macro words when there are no missing column names.
if missing(name) then name=upcase;
The text was updated successfully, but these errors were encountered:
The current code should already be replacing empty names with VARnnn where nnn is the variable number. Can you provide an example file that causes the trouble?
The only way I could re-create something like that problem is to (1) have VALIDVARNAME=ANY set. (2) Write the CSV file using TERMSTR=CRLF (3) Tell %CSV2DS() to read the file using TERMSTR=LF. In that case it will create a variable whose name is the single CR character that it read from the file. Which when printed will look a lot like a space.
I recently tried to import a CSV-file with one column name missing and I tried doing that with your CSV2DS macro.
It resulted in an error.
The following statement, in the data step that creates TYPES, solves that problem and doesn't impact the way the macro words when there are no missing column names.
if missing(name) then name=upcase;
The text was updated successfully, but these errors were encountered: