1. I have 20 files located in c:\myfile\ they all have a name sequence such as file1_2011 file1_2010 file1_2009 etc...
2. One field name is Client#, another is Client Name. SAS would have an issue importing Client# due to the #. It would have a problem with Client Name due to the space.
3. In addition there is a space at the top of each file so the data actually begins on line2 for each.
I wrote the following program in an attempt to load one report
data lib.clients_invoices;
length
Client# 8 Client Name $30 Invoice $10 Date Accession $12 Test Code $12 Description $20 Amount 8 Procedures $30;
infile 'V:\pcsas_export_files\clients_invoices_20020430.xls' dlm =' #';
run;
I get the following error message
Client# 8 Client Name $30 Invoice $10 Date Accession $12 Test Code $12 Description $20
-
391
200
76
156! Amount 8 Procedures $30;
ERROR 391-185: Expecting a variable length specification.
ERROR 200-322: The symbol is not recognized and will be ignored.
ERROR 76-322: Syntax error, statement will be ignored.
1. How can I avoid the # issue
2. Spaces between variables (ie Client Name)
3. Use the same program but now import all twenty at one time
ie 'V:\pcsas_export_files\clients_invoices_*'; or similar
2. One field name is Client#, another is Client Name. SAS would have an issue importing Client# due to the #. It would have a problem with Client Name due to the space.
3. In addition there is a space at the top of each file so the data actually begins on line2 for each.
I wrote the following program in an attempt to load one report
data lib.clients_invoices;
length
Client# 8 Client Name $30 Invoice $10 Date Accession $12 Test Code $12 Description $20 Amount 8 Procedures $30;
infile 'V:\pcsas_export_files\clients_invoices_20020430.xls' dlm =' #';
run;
I get the following error message
Client# 8 Client Name $30 Invoice $10 Date Accession $12 Test Code $12 Description $20
-
391
200
76
156! Amount 8 Procedures $30;
ERROR 391-185: Expecting a variable length specification.
ERROR 200-322: The symbol is not recognized and will be ignored.
ERROR 76-322: Syntax error, statement will be ignored.
1. How can I avoid the # issue
2. Spaces between variables (ie Client Name)
3. Use the same program but now import all twenty at one time
ie 'V:\pcsas_export_files\clients_invoices_*'; or similar