With SAS system, you have some options like using a SAS view to generate a file and then reference the file in a subsequent DATA step, for example.
Also, if you use the SET statement and supply no specific input, SAS will default to the prior SAS member/file created in the same SAS session.
Also, if you wish to specify a SAS file to create and then in a subsequent input using a SET, then consider using a SAS MACRO variable to list the "passed" file name information, where it would be defined with a %LET statement, referenced on a DATA statement using the associated macro variable syntax, and then again later referenced, as needed, again with the macro variable syntax.
Otherwise, it's not really clear exactly what you are trying to accomplish and how to recommend an approach, without more specific detailed information.
Scott Barry
SBBWorks, Inc.