Help using Base SAS procedures

DUPOUT Syntax error

Reply
Contributor
Posts: 50

DUPOUT Syntax error

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

Super User
Posts: 9,691

Re: DUPOUT Syntax error

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

Contributor
Posts: 50

Re: DUPOUT Syntax error

Thanks Xia, it works.

Valued Guide
Posts: 3,208

Re: DUPOUT Syntax error

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 --<-----
PROC Star
Posts: 7,366

Re: DUPOUT Syntax error

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

Valued Guide
Posts: 3,208

Re: DUPOUT Syntax error

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 --<-----
Super User
Posts: 9,691

Re: DUPOUT Syntax error

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

Ask a Question
Discussion stats
  • 6 replies
  • 535 views
  • 2 likes
  • 4 in conversation