BookmarkSubscribeRSS Feed
Siddharth123
Obsidian | Level 7

Hello all,

I am using SAS 9.0 For windows, but it seems as if this version does not support DUPOUT for proc sort. I am using code-

PROC SORT DATA = test nodup dupout = temp ;

BY _ALL_;

RUN;

so what I want is to have a dataset with a duplicate row using DUPOUT. But I get syntax error :

ERROR 76-322: Syntax error, statement will be ignored.

Please help.

regards

sk

6 REPLIES 6
Ksharp
Super User

WOW, SASA9.0 I can't believe there were still SAS9.0 exist in somewhere of the world . That was  almost released at 1990 .

You can't use dupout= option with SAS9.0, but you can code it to accomplish your task .

data single dupout;

set have;

by group;

if first.group then output single ;

else output dupout;

run;

Xia Keshan

Siddharth123
Obsidian | Level 7

Thanks Xia, it works.

jakarman
Barite | Level 11

It did already exist in V8 1566 - Why duplicate observations occur when using the NODUP SORT option
Please show your screenshots. Really 9.0? that is almost as old as V8.2. Time to upgrade. 

---->-- ja karman --<-----
art297
Opal | Level 21

Jaap,

Not to be picky but, according to the documentation ( http://support.sas.com/documentation/onlinedoc/91pdf/sasdoc_913/whatsnew_10878.pdf ), dupout wasn't introduced until 9.1

Art

jakarman
Barite | Level 11

Very well indeed Arthur. This one is for you.

I could not find it. But I was also not remembering when that dupout became an option, getting old, sometimes my memory is lacking or too slow. 

---->-- ja karman --<-----
Ksharp
Super User

Don't be shame of it ,Jaap. SAS is so huge, you can't remember every details of it , and further more , SAS add lots of function proc option  in every SAS version release .That is why we need keep learning -> remember -> forgotten ->re-remember -> forgotten again  ......  It is revolution .

Xia Keshan

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 6 replies
  • 1600 views
  • 2 likes
  • 4 in conversation