BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
jaselig
Calcite | Level 5

i'm just finished a project (egp) and pretty much is working as we need, now i want to build a GUI interface in order to making more friendly to use

at this moment it works as follow

filename NEW_FILE 'path file\file.txt ';

DATA dataset (drop= variable1 variable5) ;

    LENGTH

        variable1             8

        variable2        $ 50

        variable3        $ 50

        variable4      $ 50

        variable5         $ 50

        variable6            $ 50

    FORMAT

        variable1     DDMMYY10.

        variable2        $CHAR50.

        variable3       $CHAR50.

        variable4      $CHAR50.

        variable5          $CHAR50.

        variable6           $CHAR50.

      

    INFILE NEW_FILE

        DLM=';' DSD ;

.......

......

......

It its possible to get pathfile\file.txt using WINDOWS BROWSER ? (if not we are forcing to rename each file prior to use this sas project)

any ideas?

regards

1 ACCEPTED SOLUTION

Accepted Solutions
tlk
Quartz | Level 8 tlk
Quartz | Level 8

Hello,

You have to define a prompt in the prompt manager.  There is a "file or directory" type prompt that will do what you need.   The prompt create a macro variable that you can use in your program.    The macro variable have the same name has your defined prompt.  You have to add your prompt in the program properties.

View solution in original post

4 REPLIES 4
tlk
Quartz | Level 8 tlk
Quartz | Level 8

Hello,

You have to define a prompt in the prompt manager.  There is a "file or directory" type prompt that will do what you need.   The prompt create a macro variable that you can use in your program.    The macro variable have the same name has your defined prompt.  You have to add your prompt in the program properties.

jaselig
Calcite | Level 5

seems to be the right way to solve this problem but still missing something.

once i add the prompt to program properties, indeed program ask for the file , but is unable to import any data

"ERROR: No logical assign for filename NEW_FILE "

prompt is with variable name NEW_FILE and program is

filename NEW_FILE ;

data step.....

length.....

format......

.....

.....

    INFILE NEW_FILE

        DLM=';' DSD ;

what am i missing here?

jaselig
Calcite | Level 5

seems to be the right way to solve this problem but still missing something.

once i add the prompt to program properties, indeed program ask for the file , but is unable to import any data

"ERROR: No logical assign for filename NEW_FILE "

prompt is with variable name NEW_FILE and program is

filename NEW_FILE ;

data step.....

length.....

format......

.....

.....

    INFILE NEW_FILE

        DLM=';' DSD ;

what am i missing here?

jaselig
Calcite | Level 5

i'm realize how configure the macro varible in infile statment.

infile "&NEW_FILE"

regards,

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 1243 views
  • 1 like
  • 2 in conversation