Plz guide me.I want to save the data with the dropped varaibles.In the log window the dropeed varaibles dont exist , bur t when i save the data and run it in windows , the dropped variables exist , which i dont want when i open the SAS file " result.sas7bdat "
DateTimeofSale = DateofSale||":"||TimeofSale;
proc print data = result(drop= DateofSale TimeofSale);
In the code you show, you are creating a PERMANENT dataset in the SC library: SC.RESULT.
In your PROC PRINT, you have 2 issues:
1) you are printing just with a 1-level name -- which means that you are printing WORK.RESULT, not SC.RESULT. I assume you want to print the most current SC.RESULT. In a subsequent session, WORK.RESULT may not exist.
2) the DROP= option in the PROC PRINT only applies to WORK.RESULT and the display of the variables. The variables will still exist in the data set (whether in WORK or SC library).
If you want to permanently drop the variables from the SC.RESULT dataset, then you either need to use the DROP statement in your DATA step program or you need to use the DROP= option for SC.RESULT. Putting the DROP= in the PROC PRINT step will NOT drop the variables from the dataset.
ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, *, **, +, -, /, <, <=, <>, =,
>, ><, >=, AND, EQ, GE, GT, IN, LE, LT, MAX, MIN, NE, NG, NL, NOTIN, OR, ^=, |, ||,
NOTE: Character values have been converted to numeric values at the places given by: (Line)Column).
322:29 323:34 324:15 324:26
NOTE: Numeric values have been converted to character values at the places given by: (Line)Column).
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.RESULT may be incomplete. When this step was stopped there were 0
observations and 9 variables.
WARNING: Data set WORK.RESULT was not replaced because this step was stopped.