BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Or start by correcting the most obvious syntax errors:

  • line 2: missing %SYSFUNC call for MONTH function
  • line 5: missing percent sign before "PUT"
  • line 6: missing equals sign in KEEP= dataset option
  • line 10: incorrect "=" in WHERE statement
  • line 11: unbalanced closing parenthesis
  • missing double quotes around dataset name in DECLARE statement
  • missing data item in DEFINEDATA method
  • missing OUT keyword in OUTPUT statement of PROC SUMMARY
  • PROC SORT step misses a BY statement, but uses a "CLASS statement"

Has variable name CONTI_CARD_FALG been misspelled in the dataset CCARDDB.CCM_EXPD_CARD_SNAP_M_20150131?

View solution in original post

5 REPLIES 5
PeterClemmensen
Tourmaline | Level 20

You have to provide more information than this. Does your code produce an error? Where does your code act differently than you expect?

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Please start by posting code as actual text, using a code window - its the {i} above post area.  Secondly please post the log showing the error/warning you are inquiring about, and the code that is run as part of the log.

FreelanceReinh
Jade | Level 19

Or start by correcting the most obvious syntax errors:

  • line 2: missing %SYSFUNC call for MONTH function
  • line 5: missing percent sign before "PUT"
  • line 6: missing equals sign in KEEP= dataset option
  • line 10: incorrect "=" in WHERE statement
  • line 11: unbalanced closing parenthesis
  • missing double quotes around dataset name in DECLARE statement
  • missing data item in DEFINEDATA method
  • missing OUT keyword in OUTPUT statement of PROC SUMMARY
  • PROC SORT step misses a BY statement, but uses a "CLASS statement"

Has variable name CONTI_CARD_FALG been misspelled in the dataset CCARDDB.CCM_EXPD_CARD_SNAP_M_20150131?

ballardw
Super User

In addition to @FreelanceReinh's suggestions I think you need to look very closely at your double quote characters. For example the quotes around ACCT appear to be word processor quotes and not programming quotes that look like:

HH.DEFINEKEY("ACCT");

If someone copies code from the internet or a work processor document sometimes you have "smart quotes" or similar characters instead of the ones that the program syntax parser expects.

 

ALL of those quotes need to be " characters.

Geo-
Quartz | Level 8
thanks for your reply.I could not copy it into text since it's a exam in our company system..the correction is only considered from syntax way,no other consideration is needed

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
  • 5 replies
  • 863 views
  • 1 like
  • 5 in conversation