BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,
i have recently moved from SAS 9.2 to 9.13 adn some of my code wont work any more. I have quite a large macro and i get an error message on the first instance of a few let functions.

Code:

data QSI_WealthSGout;
set wealthselfgenapp;
where BranchID eq &id;
run;
%let WealthSGrows=%eval(%nobs(QSI_WealthSGout)+4);


Error Message:

WARNING: Apparent invocation of macro NOBS not resolved.
WARNING: Apparent invocation of macro NOBS not resolved.
ERROR: Required operator not found in expression: %nobs(QSI_WealthSGout)+4
ERROR: The macro CREATEBOOKS will stop executing.

im thinking it may not recognise %nobs on the first loop but am slightly cluless as to why it doesnt work in a different version of SAS

Any help would be great
Cheers
Mike
3 REPLIES 3
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
The %NOBS macro your code is executing is likely an AUTOCALL macro (or one imbedded in a %INCLUDE source code file). It's possible that you installed or defined some utility macros within your prior SAS environment and these items were not automatically promoted to your new (from your post, it appears as an older version?) SAS environment.

Suggest you review your previous SAS environment and search for the macro.

Scott Barry
SBBWorks, Inc.
deleted_user
Not applicable
thanks for that Scott, i still have access to the library of Macros i had before so that a bit strange... its someone elses code so i will have to build a work around

Cheers
Mike
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
This situation should be a "take note" opportunity for others on this "line" that it's not just important to back-up your SAS data but also your SAS source code (with multiple versions to CYA), including any SAS object catalogs (INFORMATs, FORMATs, compiled SAS macros).

And you may want to just test the waters with your Stg Admin, inquiring about "how do I go about requesting that a driver/directory (file system) be restored, please - oh, yes, and how many backup-versions are maintained for my 'production' server machine?" Just a few thoughts for the morning.

Scott Barry
SBBWorks, Inc.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 3 replies
  • 787 views
  • 0 likes
  • 2 in conversation