BookmarkSubscribeRSS Feed
PranayaG
Calcite | Level 5

NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space between  a quoted string and the succeeding identifier is recommended.

 

 

code

if _QSCAT="BATH ANKYLOSING SPONDYLITIS DISEASE ACTIVITY INDEX (BASDAI)" and upcase(_INSTANCENAME1) not in ("UNSCHEDULED" ,"WEEK 12" ,"WEEK 36" ,"WEEK 60" ,"WEEK 84" ,"WEEK 108"
"WEEK 132" ,"WEEK 24" ,"WEEK 72" ,"WEEK 120" ,"WEEK 52" ,"WEEK 96" ,"WEEK 140" ,"WEEK 152" ,"WEEK 164" ,"WEEK 176" ,"WEEK 188" ,"WEEK 192" ,"EARLY TERMINATION") then delete;
if _QSCAT="EQ-5D-3L" and upcase(_INSTANCENAME1) not in ("UNSCHEDULED" ,"WEEK 24" ,"WEEK 72" ,"WEEK 120" ,"WEEK 52" ,"WEEK 96" ,"WEEK 140" ,"WEEK 152" ,"WEEK 164" ,"WEEK 176" ,"WEEK 188" ,"WEEK 192" ,"EARLY TERMINATION") then delete;
if _QSCAT="FACIT FATIGUE SCALE (VERSION 4)" and upcase(_INSTANCENAME1) not in ("UNSCHEDULED" ,"WEEK 24" ,"WEEK 72" ,"WEEK 120" ,"WEEK 52" ,"WEEK 96" ,"WEEK 140" ,"WEEK 152" ,"WEEK 164" ,"WEEK 176" ,"WEEK 188" ,"WEEK 192" ,"EARLY TERMINATION") then delete;
if _QSCAT="HEALTH ASSESSMENT QUESTIONNAIRE - DISABILITY INDEX (HAQ-DI)" and upcase(_INSTANCENAME1) not in ("UNSCHEDULED" ,"WEEK 12" ,"WEEK 36" ,"WEEK 60" ,"WEEK 84" ,"WEEK 108"
"WEEK 132" ,"WEEK 24" ,"WEEK 72" ,"WEEK 120" ,"WEEK 52" ,"WEEK 96" ,"WEEK 140" ,"WEEK 152" ,"WEEK 164" ,"WEEK 176" ,"WEEK 188" ,"WEEK 192" ,"EARLY TERMINATION") then delete;
if _QSCAT="JOINT ASSESSMENT" and upcase(_INSTANCENAME1) not in ("UNSCHEDULED" ,"WEEK 12" ,"WEEK 36" ,"WEEK 60" ,"WEEK 84" ,"WEEK 108"
"WEEK 132" ,"WEEK 24" ,"WEEK 72" ,"WEEK 120" ,"WEEK 52" ,"WEEK 96" ,"WEEK 140" ,"WEEK 152" ,"WEEK 164" ,"WEEK 176" ,"WEEK 188" ,"WEEK 192" ,"EARLY TERMINATION" ,"UNSCHEDULED") then delete;
if _QSCAT="LEEDS DACTYLITIS INDEX" and upcase(_INSTANCENAME1) not in ("UNSCHEDULED" ,"WEEK 12" ,"WEEK 36" ,"WEEK 60" ,"WEEK 84" ,"WEEK 108"
"WEEK 132" ,"WEEK 24" ,"WEEK 72" ,"WEEK 120" ,"WEEK 52" ,"WEEK 96" ,"WEEK 140" ,"WEEK 152" ,"WEEK 164" ,"WEEK 176" ,"WEEK 188" ,"WEEK 192" ,"EARLY TERMINATION") then delete;
if _QSCAT="MODIFIED NAIL PSORIASIS SEVERITY INDEX (MNAPSI)" and upcase(_INSTANCENAME1) not in ("WEEK 12" ,"WEEK 36" ,"WEEK 60" ,"WEEK 84" ,"WEEK 108"
"WEEK 132" ,"WEEK 24" ,"WEEK 72" ,"WEEK 120" ,"WEEK 52" ,"WEEK 96" ,"WEEK 140" ,"WEEK 152" ,"WEEK 164" ,"WEEK 176" ,"WEEK 188" ,"WEEK 192" ,"EARLY TERMINATION" ,"UNSCHEDULED") then delete;
if _QSCAT="PSORIASIS AREA AND SEVERITY INDEX (PASI)" and
upcase(_INSTANCENAME1) not in ("WEEK 12" ,"WEEK 24" ,"WEEK 36" ,"WEEK 52" ,"WEEK 60" ,"WEEK 72" ,"WEEK 84" ,"WEEK 96" ,"WEEK 108" ,"WEEK 120" ,"WEEK 132" ,"WEEK 140" ,"WEEK 152" ,"WEEK 164" ,"WEEK 176" ,"WEEK 188" ,"WEEK 192"
"EARLY TERMINATION" ,"UNSCHEDULED") then delete;
if _QSCAT="PSORIASIS BODY SURFACE AREA" and upcase(_INSTANCENAME1) not in ("WEEK 52" ,"WEEK 96" ,"WEEK 140" ,"WEEK 152" ,"WEEK 164" ,"WEEK 176" ,"WEEK 188" ,"WEEK 192" ,"EARLY TERMINATION" ,"UNSCHEDULED") then delete;
if _QSCAT="PATIENT'S ASSESSMENT OF ARTHRITIS PAIN" and upcase(_INSTANCENAME1) not in ("UNSCHEDULED" ,"WEEK 12" ,"WEEK 36" ,"WEEK 60" ,"WEEK 84" ,"WEEK 108"
"WEEK 132" ,"WEEK 24" ,"WEEK 72" ,"WEEK 120" ,"WEEK 52" ,"WEEK 96" ,"WEEK 140" ,"WEEK 152" ,"WEEK 164" ,"WEEK 176" ,"WEEK 188" ,"WEEK 192" ,"EARLY TERMINATION" ,"UNSCHEDULED") then delete;
if _QSCAT="PHQ-9" and upcase(_INSTANCENAME1) not in ("UNSCHEDULED" ,"WEEK 24" ,"WEEK 72" ,"WEEK 120" ,"WEEK 52" ,"WEEK 96" ,"WEEK 140" ,"WEEK 152" ,"WEEK 164" ,"WEEK 176" ,"WEEK 188" ,"WEEK 192" ,"EARLY TERMINATION") then delete;
if _QSCAT="PHYSICIAN'S GLOBAL ASSESSMENT OF PSORIASIS (PGAP)" and upcase(_INSTANCENAME1) not in ("WEEK 12" ,"WEEK 36" ,"WEEK 60" ,"WEEK 84" ,"WEEK 108"
"WEEK 132" ,"WEEK 24" ,"WEEK 72" ,"WEEK 120" ,"WEEK 52" ,"WEEK 96" ,"WEEK 140" ,"WEEK 152" ,"WEEK 164" ,"WEEK 176" ,"WEEK 188" ,"WEEK 192" ,"EARLY TERMINATION" ,"UNSCHEDULED") then delete;
if _QSCAT="PSORIATIC ARTHRITIS IMPACT OF DISEASE-12 (PSAID-12)" and upcase(_INSTANCENAME1) not in ("UNSCHEDULED" ,"WEEK 24" ,"WEEK 72" ,"WEEK 120" ,"WEEK 52" ,"WEEK 96" ,"WEEK 140" ,"WEEK 152" ,"WEEK 164" ,"WEEK 176" ,"WEEK 188" ,"WEEK 192" ,"EARLY TERMINATION" ,"UNSCHEDULED") then delete;
if _QSCAT="PATIENT'S GLOBAL ASSESSMENT OF ARTHRITIS" and upcase(_INSTANCENAME1) not in ("WEEK 12" ,"WEEK 36" ,"WEEK 60" ,"WEEK 84" ,"WEEK 108"
"WEEK 132" ,"WEEK 24" ,"WEEK 72" ,"WEEK 120" ,"WEEK 52" ,"WEEK 96" ,"WEEK 140" ,"WEEK 152" ,"WEEK 164" ,"WEEK 176" ,"WEEK 188" ,"WEEK 192" ,"EARLY TERMINATION" ,"UNSCHEDULED") then delete;
if _QSCAT="PATIENT'S GLOBAL ASSESSMENT OF PSORIATIC ARTHRITIS" and upcase(_INSTANCENAME1) not in ("UNSCHEDULED" ,"WEEK 12" ,"WEEK 36" ,"WEEK 60" ,"WEEK 84" ,"WEEK 108"
"WEEK 132" ,"WEEK 24" ,"WEEK 72" ,"WEEK 120" ,"WEEK 52" ,"WEEK 96" ,"WEEK 140" ,"WEEK 152" ,"WEEK 164" ,"WEEK 176" ,"WEEK 188" ,"WEEK 192" ,"EARLY TERMINATION" ,"UNSCHEDULED") then delete;
if _QSCAT="PHYSICIAN'S GLOBAL ASSESSMENT OF ARTHRITIS" and upcase(_INSTANCENAME1) not in ("WEEK 12" ,"WEEK 36" ,"WEEK 60" ,"WEEK 84" ,"WEEK 108"
"WEEK 132" ,"WEEK 24" ,"WEEK 72" ,"WEEK 120" ,"WEEK 52" ,"WEEK 96" ,"WEEK 140" ,"WEEK 152" ,"WEEK 164" ,"WEEK 176" ,"WEEK 188" ,"WEEK 192" ,"EARLY TERMINATION" ,"UNSCHEDULED") then delete;
if _QSCAT="PHYSICIAN'S GLOBAL ASSESSMENT OF PSORIATIC ARTHRITIS" and upcase(_INSTANCENAME1) not in ("WEEK 12" ,"WEEK 36" ,"WEEK 60" ,"WEEK 84" ,"WEEK 108"
"WEEK 132" ,"WEEK 24" ,"WEEK 72" ,"WEEK 120" ,"WEEK 52" ,"WEEK 96" ,"WEEK 140" ,"WEEK 152" ,"WEEK 164" ,"WEEK 176" ,"WEEK 188" ,"WEEK 192" ,"EARLY TERMINATION" ,"UNSCHEDULED") then delete;

/*if _QSCAT="PATIENT'S GLOBAL ASSESSMENT OF DISEASE ACTIVITY" and upcase(_INSTANCENAME1) not in ("WEEK 12" ,"WEEK 36" ,"WEEK 60" ,"WEEK 84" ,"WEEK 108" */
/*"WEEK 132" ,"WEEK 24" ,"WEEK 72" ,"WEEK 120" ,"WEEK 52" ,"WEEK 96" ,"WEEK 140" ,"WEEK 152" ,"WEEK 164" ,"WEEK 176" ,"WEEK 188" ,"WEEK 192" ,"EARLY TERMINATION" ,"UNSCHEDULED") then delete;*/
/*if _QSCAT="PHYSICIAN'S GLOBAL ASSESSMENT OF DISEASE ACTIVITY" and upcase(_INSTANCENAME1) not in ("WEEK 12" ,"WEEK 36" ,"WEEK 60" ,"WEEK 84" ,"WEEK 108" */
/*"WEEK 132" ,"WEEK 24" ,"WEEK 72" ,"WEEK 120" ,"WEEK 52" ,"WEEK 96" ,"WEEK 140" ,"WEEK 152" ,"WEEK 164" ,"WEEK 176" ,"WEEK 188" ,"WEEK 192" ,"EARLY TERMINATION" ,"UNSCHEDULED") then delete;*/
if _QSCAT="PHYSICIAN'S GLOBAL ASSESSMENT OF DISEASE ACTIVITY" then delete;
if _QSCAT="PATIENT'S GLOBAL ASSESSMENT OF DISEASE ACTIVITY" then delete;
if _QSCAT="PSORIATIC ARTHRITIS QUALITY OF LIFE (PSAQOL)" then delete;

if _QSCAT="SF-36 HEALTH SURVEY" and upcase(_INSTANCENAME1) not in ("UNSCHEDULED" ,"WEEK 24" ,"WEEK 72" ,"WEEK 120" ,"WEEK 52" ,"WEEK 96" ,"WEEK 140" ,"WEEK 152" ,"WEEK 164" ,"WEEK 176" ,"WEEK 188" ,"WEEK 192" ,"EARLY TERMINATION") then delete;
if _QSCAT="SPONDYLOARTHRITIS RESEARCH CONSORTIUM OF CANADA AND LEEDS ENTHESITIS INDEX (SPARCC AND LEI)"
and upcase(_INSTANCENAME1) not in ("WEEK 12" ,"WEEK 36" ,"WEEK 60" ,"WEEK 84" ,"WEEK 108"
"WEEK 132" ,"WEEK 24" ,"WEEK 72" ,"WEEK 120" ,"WEEK 52" ,"WEEK 96" ,"WEEK 140" ,"WEEK 152" ,"WEEK 164" ,"WEEK 176" ,"WEEK 188" ,"WEEK 192" ,"EARLY TERMINATION" ,"UNSCHEDULED")then delete;
if _QSCAT="TUBERCULOSIS" and strip(upcase(_INSTANCENAME1)) not in ("UNSCHEDULED" ,"WEEK 12" ,"WEEK 36" ,"WEEK 60" ,"WEEK 84" ,"WEEK 108"
"WEEK 132" ,"WEEK 24" ,"WEEK 72" ,"WEEK 120" ,"WEEK 52" ,"WEEK 96" ,"WEEK 140" ,"WEEK 152" ,"WEEK 164" ,"WEEK 176" ,"WEEK 188" ,"WEEK 192" ,"WEEK 164" ,"EARLY TERMINATION" ,"SFU" ,"SAFETY FOLLOW-UP") then delete;
if _QSCAT="WPAI-SHP" and upcase(_INSTANCENAME1) not in ("UNSCHEDULED" ,"WEEK 24" ,"WEEK 72" ,"WEEK 120" ,"WEEK 52" ,"WEEK 96" ,"WEEK 140" ,"WEEK 152" ,"WEEK 164" ,"WEEK 176" ,"WEEK 188" ,"WEEK 192" ,"EARLY TERMINATION") then delete;

if _QSCAT="PRE-SELF INJECTION ASSESSMENT QUESTIONNAIRE (PRE-SIAQ)" and upcase(_INSTANCENAME1) not in ("ENTRY VISIT" ,"UNSCHEDULED") then delete;
if _QSCAT="INJECTION SITE PAIN" and upcase(_INSTANCENAME1) not in ("ENTRY VISIT" ,"WEEK 4" ,"UNSCHEDULED") then delete;
if _QSCAT="POST-SELF INJECTION ASSESSMENT QUESTIONNAIRE (POST-SIAQ)" and upcase(_INSTANCENAME1) not in ("ENTRY VISIT" ,"WEEK 4" ,"UNSCHEDULED") then delete;
run;

 

 

3 REPLIES 3
mkeintz
PROC Star

SAS has a collection of literals whose syntax use a quoted expresssion immediately followed by a character (the "idenifier" referred to in the note) to establish the type of literal, including

  1. DATE literals:      "20JUL2023"d   or '20jul2023'd
  2. TIME literals:       "13:40:55.5"t  or '13:40:55.5't
  3. DATETIME literals:  "20JUL2023:13:40:55.5"dt  and same with single quotes.

Likely most relevant to your task is the establishment by SAS of name literals, ("xxx"n or 'xxx'n) as in:

 

data new;
  set sashelp.class;
  "Body Mass Index"n=weight/(703*height**2);
run;

This allows you to have special characters or blanks in variable names or dataset names.  (Make sure you have options validvarname=any set).

 

Given this convention of immediately following a quoted string by a character to identify the type of literal, then new types of literals could be introduced simply by using a new trailing character.  So any instance, in an old program, of a quoted expression immediately followed by a character might be subject to a new interpretation, even though it currently works as intended.

 

For instance, this program works as intended (select girls over 13).

data older_girls;
  set sashelp.class;
  if sex="F"and age>13;
run;

but it also generates the note you report.  The note can be removed by putting a blank between the quote character and the and in the subsetting IF statement, as a means of future-proofing against new types of literals.

 

You have instances of    "and in your code which produces this note.

 

 

BTW, you also have instances of "WEEK108" that "should" be followed by a comma.  (But see @Tom 's reply).

 

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------
Tom
Super User Tom
Super User

BTW, you also have instances of "WEEK108" that should be followed by a comma.

For consistency yes.  But not for SAS syntax.  The IN operator does not care if the list of items is separated by spaces or commas or both.  Code like this is fine:

if x in (1 , 2 3 4 5 , 6) ;

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 3 replies
  • 651 views
  • 1 like
  • 4 in conversation