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,

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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