06-05-2012 07:18 AM
Working on Enterprice Guide, I usually import files using the wizard (File -> Import Data). It works perfectly, but I would like to use a program in order to make it more dynamic with macros.
Copying completely the code generated by the wizard inside a new program, it doesn't work.
It seems that the name of the file is typed as a comment and the INFILE instruction it is replaced by "__AS_work7D3A000037C7_sapmop41/#LN00058". I replaced it with the correct path
but it still doesn't work. The output is generated but the contents is corrupted (strange symbols).
How can I solve the problem?
This is the code:
06-05-2012 07:35 AM
What version of EG you are using..it works fine for me with 4.3 Version.
F1 $ 6
F2 $ 2 ;
F2 $CHAR2. ;
F2 $CHAR2. ;
INFILE 'C:\DOCUME~1\test\LOCALS~1\Temp\SAS Temporary Files\_TD6124\#LN00008'
F1 : $CHAR6.
F2 : $CHAR2. ;
or you can just use Proc import procedure.
06-05-2012 11:00 AM
That's not so elegant but finally I solved the problem leaving the import-object pointing always the same file
but replacing the input-file with the new one. Simply using unix commands from SAS. The new file path is prompt by the user.
If someone needs, I can post the program..
10-17-2012 01:16 PM
Hi Carmine, I have the exactly same problem with SAS 4.3 now. Please could you send me the script you used? my email is firstname.lastname@example.org