Help using Base SAS procedures

ERROR 252-185: The MISSING subroutine call does not have enough arguments.

Accepted Solution Solved
Reply
Occasional Contributor SSG
Occasional Contributor
Posts: 12
Accepted Solution

ERROR 252-185: The MISSING subroutine call does not have enough arguments.

Currently running SAS 9.4. I've found absolutely nothing about the above error message anywhere, so I'm hoping the community can help. I'm trying to execute the CALL MISSING  routine as part of a data step below:

 

data HLS_Advisor;set HLS_data;
if COHORT_YEAR =2016 then call missing
(of CUM_GPA_CENSUS_1_YR-CUM_GPA_CENSUS_6_YRS, of RETAIN_1_YR_ORG_CAMPUS-RETAIN_6_YR_ORG_CAMPUS, of GRAD_1_YR_ORG_CAMPUS-GRAD_6_YR_ORG_CAMPUS);

 

What is the error above and how do I fix it?

 

P.S.

I'm also getting "ERROR: Missing numeric suffix on a numbered variable list" for all three arrays.  Can't find anything about how toi fix that either.


Accepted Solutions
Solution
‎01-31-2017 01:04 PM
Super User
Posts: 5,518

Re: ERROR 252-185: The MISSING subroutine call does not have enough arguments.

[ Edited ]

In SAS, this is not a proper way of specifying a list of variables:

 

CUM_GPA_CENSUS_1_YR-CUM_GPA_CENSUS_6_YRS

 

If your variables were named differently, you could use:

 

CUM_GPA_CENSUS_YR_1-CUM_GPA_CENSUS_YR_6

 

To use this type of list, the variable names must all begin with the same prefix, and must end with a numeric suffix.

 

There is another way, that might be appropriate, depending on the full set of variable names in your data:

 

if COHORT_YEAR =2016 then call missing
(of CUM_GPA_CENSUS_:, of RETAIN_:, of GRAD_: );

 

Using the colon represents all variable names that begin with the character listed in the prefix.  So if you have NO other variables that begin with the name RETAIN_, GRAD_, etc. you could use this style.  Otherwise, you just have to spell out the list of all 18 variable names.

 

 

View solution in original post


All Replies
Solution
‎01-31-2017 01:04 PM
Super User
Posts: 5,518

Re: ERROR 252-185: The MISSING subroutine call does not have enough arguments.

[ Edited ]

In SAS, this is not a proper way of specifying a list of variables:

 

CUM_GPA_CENSUS_1_YR-CUM_GPA_CENSUS_6_YRS

 

If your variables were named differently, you could use:

 

CUM_GPA_CENSUS_YR_1-CUM_GPA_CENSUS_YR_6

 

To use this type of list, the variable names must all begin with the same prefix, and must end with a numeric suffix.

 

There is another way, that might be appropriate, depending on the full set of variable names in your data:

 

if COHORT_YEAR =2016 then call missing
(of CUM_GPA_CENSUS_:, of RETAIN_:, of GRAD_: );

 

Using the colon represents all variable names that begin with the character listed in the prefix.  So if you have NO other variables that begin with the name RETAIN_, GRAD_, etc. you could use this style.  Otherwise, you just have to spell out the list of all 18 variable names.

 

 

Occasional Contributor SSG
Occasional Contributor
Posts: 12

Re: ERROR 252-185: The MISSING subroutine call does not have enough arguments.

Posted in reply to Astounding

That seems rather arbitrary but it worked.  Thanks!  

 

BTW, these  fields are being pulled in from an Oracle SQL Server database, so the naming conventions are based on what works there rather than what works best for SAS.  Hopefully this will be fixed in a future SAS release.

Respected Advisor
Posts: 3,799

Re: ERROR 252-185: The MISSING subroutine call does not have enough arguments.


SSG wrote:

That seems rather arbitrary but it worked.  Thanks!  

 

BTW, these  fields are being pulled in from an Oracle SQL Server database, so the naming conventions are based on what works there rather than what works best for SAS.  Hopefully this will be fixed in a future SAS release.


Nothing is broken. Nothing to fix.

Super User
Super User
Posts: 7,079

Re: ERROR 252-185: The MISSING subroutine call does not have enough arguments.

Enumerated lists of variables need have the counter at the END of the variable name, not in the middle.

If you want to select a range of variables based on POSITION then you can use a double hyphen.

 

call missing 
(of CUM_GPA_CENSUS_1_YR -- CUM_GPA_CENSUS_6_YRS
  RETAIN_1_YR_ORG_CAMPUS -- RETAIN_6_YR_ORG_CAMPUS
  GRAD_1_YR_ORG_CAMPUS -- GRAD_6_YR_ORG_CAMPUS
);
 

But this will include any other variables that just happen to appear between the two listed.  

 

To see the variable names in order use the VARNUM option on PROC CONTENTS.  Or just do a quick data step to spit out the variable names ot the log.

data _null_;
  set HLS_data (obs=1);
  put (_all_) (=/);
run;
Valued Guide
Posts: 2,177

Re: ERROR 252-185: The MISSING subroutine call does not have enough arguments.

as nothing is broken
we have only to cope with what appears to be a feature of oracle name ranges that I would call unreliable:
Does oracle really allow variable name ranges where the number is anywhere in the middle of a name?
What should its parser assume where two separated numbers appear within the name?-CUM_GPA_4_CENSUS_6_YR - -CUM_GPA_6_CENSUS_11_YRS

A SAS approach can almost cope -we just need to define where the number is expected to appear. A regular expression definition would be ideal....
From a download of the column names in the oracle table we could extract the range of column names that match the required pattern INTO : REQUIRED_COLUMNS_LIST

I remain surprised that anyone can suggest oracle has a superior column name parser than SAS
~~~~~
just my $0.01
Occasional Contributor SSG
Occasional Contributor
Posts: 12

Re: ERROR 252-185: The MISSING subroutine call does not have enough arguments.

I don't create tables in Oracle, I just pull stuff down. And that's what I got.
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 224 views
  • 3 likes
  • 5 in conversation