BookmarkSubscribeRSS Feed
ismahero2
Obsidian | Level 7
Hi, What is really happening is that the value EG was setting to SYSLAST when I explicitly link a data set to a program in a process flow. EG in setting the SYSLAST macro to the linked data set. Because of this I am getting the following error. ERROR: Invalid option value IDATASET.'TABLE'n for SAS option _LAST_. If I don't link the dataset to the program in a process flow, the program runs without any errors. This is the error I am getting. ERROR: Invalid option value LIBRARY.'DATASET'n for SAS option _LAST_.
2 REPLIES 2
data_null__
Jade | Level 19

You don't show enough of the code/log to know exactly but I bet it is related to quoting and can be fixed with %UNQUOTE.

 

Capture.PNG

CaseySmith
SAS Employee

Hi @ismahero2,

 

As you noted, EG sets the SYSLAST macro variable when you draw an explicit link to a program.  You can see this by inspecting your log.  You'll see a line similar to this near the top of your program log:

 

3 %LET SYSLAST=WORK.MYCLASS;

 

This provides a convenient alternative to hard-coding input data in your program.  Rather than hard-coding your input table, you can use &SYSLAST macro variable references in your code and then whatever data node you link to the program in the process flow will be used as input to your program.  This also makes it easy to change the input data to your program without having to change the code...  just link a different data set node to the program.

 

I have not been able to reproduce any problems that resemble what you describe.  Please provide steps to reproduce, what version of EG you are using (in EG's Help->About), and the SAS server version you are running against (the %put &sysvlong; output in your SAS log).

 

Here is what I tried (using EG 7.15 HF7 against a SAS 9.4M3 server):

 

  1. First I submitted the following code to created two data sets in my project, one with a standard name and one with an extended name:
    data myclass;
    set sashelp.class;
    run;
    
    data 'my class'n;
    set sashelp.class;
    run;
  2. Then, I created two additional program nodes with this code:
    %put &sysvlong;
    %put &syslast;
    
    proc options option=_last_;
    run;
  3. Then, in the process flow I explicitly linked the MYCLASS data node to one of the programs and the "My CLASS" data node to the other program.  (Note: You can explicitly link nodes in the process flow by hovering near the right of the source node icon until the cursor turns into crosshairs, then drag the line to the node you wish to link to, or you can right-click the source node, select the "Link to..." context menu, and choose the node you wish to link to.)
  4. Finally, I ran the two programs that I linked the data nodes to and inspected their logs.  The output for both (below) was as expected, with no errors:
    32         %put &sysvlong;
    9.04.01M3P062415
    33         %put &syslast;
    WORK.MYCLASS
    34         
    35         proc options option=_last_;
    36         run;
    
        SAS (r) Proprietary Software Release 9.4  TS1M3
    
     _LAST_=WORK.MYCLASS
                       Specifies the most recently created data set.
    32         %put &sysvlong;
    9.04.01M3P062415
    33         %put &syslast;
    WORK.'MY CLASS'n
    34         
    35         proc options option=_last_;
    36         run;
    
        SAS (r) Proprietary Software Release 9.4  TS1M3
    
     _LAST_=WORK.MY CLASS
                       Specifies the most recently created data set.

If you provide additional information (simple steps to reproduce and EG and SAS version information), I'll be happy to take a look.

 

Casey


Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF

View now: on-demand content for SAS users

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 2 replies
  • 1303 views
  • 0 likes
  • 3 in conversation