Help using Base SAS procedures

Need help reordering variables was using word retain

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 18
Accepted Solution

Need help reordering variables was using word retain

I need to reorder my variables.....lets say the order is .....a, b, c, d, e, f...........................but I want the order to be ........c, d, e, a, b, f...........

and how do I keep the order?

here is my log:

 

533 +DATA BID77;

534 +SET BIDSBELOW22;

535 +RUN;

NOTE: There were 679522 observations read from the data set WORK.BIDSBELOW22.

NOTE: The data set WORK.BID77 has 679522 observations and 28 variables.

NOTE: DATA statement used (Total process time):

real time 0.98 seconds

cpu time 0.96 seconds

536 +

537 +proc print data = BID77 (obs=10);

538 +Where B = 2005;

539 +run;

NOTE: There were 10 observations read from the data set WORK.BID77.

WHERE B=2005;

NOTE: The PROCEDURE PRINT printed pages 1-2.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.91 seconds

cpu time 0.01 seconds

540 +

541 +data greg;

542 +retain B, CNDTLET, CNAWDAMT, PJAWDAMT, CCONTID, CONTID, PCN, CN, ILINENO, PITYPE, CMOD, IPLINENO, ISPECYR,

                       _

                      22

                      76

542 !+ITEM, IDESCR, IUNITS, ITEMCLSS, PJWRKTYP, Project_type_of_Work, PJPRJTYP, Project_Type,

ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant,

a datetime constant, a missing value, (, -, :, ;, _ALL_, _CHARACTER_, _CHAR_, _NUMERIC_.

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

543 +IQOQTY, IQEXTAMT, IQVPRICE, IPUPRICE, BIDAVG, VNAMES, LETSTAT;

544 +set BID77;

545 +run;

NOTE: The SAS System stopped processing this step because of errors.

NOTE: SAS set option OBS=0 and will continue to check statements. This may cause NOTE: No observations in data set.

WARNING: The data set WORK.GREG may be incomplete. When this step was stopped there were 0 observations and 28

variables.

NOTE: DATA statement used (Total process time):

real time 0.06 seconds

cpu time 0.01 seconds


Accepted Solutions
Solution
‎06-11-2013 08:16 AM
Super Contributor
Posts: 394

Re: Need help reordering variables was using word retain

Posted in reply to GregINGov

All Replies
Solution
‎06-11-2013 08:16 AM
Super Contributor
Posts: 394

Re: Need help reordering variables was using word retain

Posted in reply to GregINGov
Occasional Contributor
Posts: 18

Re: Need help reordering variables was using word retain

Posted in reply to GregINGov

Thanks Tim!

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 165 views
  • 0 likes
  • 2 in conversation