Desktop productivity for business analysts and programmers

Import Data: ERROR: No logical assign for filename #LN00062.

Reply
Frequent Contributor
Posts: 90

Import Data: ERROR: No logical assign for filename #LN00062.

My company is using SAS Enterprise Guide 4.2 connected to SAS 9.1.3. SAS Access Interface to PC Files is not installed.

I want to import Ms Access MDB table and prefer not to import data via ODBC. Using EG, I go to File > Import Data > Local Data > MS Access MDB

Then I click on the Import Data icon and click Add Code As Template, I get this code show below.

When I exit EG and re-open and run it again, it gives me the error: ERROR: No logical assign for filename #LN00062.

Question: I want to automate this as a code, don't want to run as a task in process flow. How can I tweak the code to run even after I re-enter EG? What is the code behind that create the file #LN00062?

.

/* -------------------------------------------------------------------

   Code generated by SAS Task

   Generated on: Tuesday, July 12, 2011 at 3:43:16 PM

   By task: Import Data

   Input Data: #LN00062

   Server:  SASMain

   ------------------------------------------------------------------- */

%_eg_conditional_dropds(WORK.CA_MASTER);

%MACRO _EG_ImportData;

%LET IsMVS=FALSE;

%IF %TRIM(&SYSSCP) = OS %THEN %DO;

%IF %sysfunc(getoption(filesystem))=MVS %THEN %DO;

          %LET IsMVS=TRUE;

%END;

%END;

DATA WORK.CA_MASTER;

/* Enterprise Guide creates this temporary asterisk delimited text file from the original data source */

          INFILE #LN00062

                    DELIMITER='*'

                    MISSOVER

                    DSD

          %IF &IsMVS=FALSE %THEN %DO;

                    LRECL=32767

          %END;

                    FIRSTOBS=2

          ;

          LENGTH

                    PRODUCT_GROUP $ 30

                    PRODUCT_NAME $ 50

                    CA_NUMBER $ 31

                    APPLICATION_MONTH $ 19

          ;

          INPUT

                    PRODUCT_GROUP $

                    PRODUCT_NAME $

                    CA_NUMBER $

                    APPLICATION_MONTH $

          ;

          LABEL

                    PRODUCT_GROUP = "PRODUCT_GROUP"

                    PRODUCT_NAME = "PRODUCT_NAME"

                    CA_NUMBER = "CA_NUMBER"

                    APPLICATION_MONTH = "APPLICATION_MONTH"

          ;

RUN;

%MEND;

%_EG_ImportData

/* -------------------------------------------------------------------

   End of task code.

   ------------------------------------------------------------------- */

RUN; QUIT;


2011-07-14_115419.png
Valued Guide
Posts: 2,111

Import Data: ERROR: No logical assign for filename #LN00062.

EGuide has some capabilities that are not part of your SAS install.  When you use the EGuide task to do the import, the EGuide client task connects to the Access database and pulls the data into a delimited text file that it hands off to your SAS 9.1.3 server.  If you run just the code, you miss the export.  If you want to do the import with code alone, you must use just the 9.1.3 tools.

Doc Muhlbaier

Duke

Ask a Question
Discussion stats
  • 1 reply
  • 884 views
  • 0 likes
  • 2 in conversation