BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
r4321
Pyrite | Level 9

Hello everyone, 

 

I have some code that is pretty much ideal for how I need to transform my data: 

 

proc summary data=adtr.as5 nway;
class year_id;
output out=adtr.as6
idgroup(out[130] (lflag rdflag mflag jflag ap var5 var14 adn nation)=) / autoname;
run;

 

 

However, I get: 

 

ERROR: The parameter value 130 is not within the required range of 1 and 100.
1900 run;

 

 

I don't know how else to do this...and...I need to have the 130 id groups. If you could help me with this code or show me another way, that would be great. Bear in mind that I am by no means an advanced programmer, still pretty novice, so please don't take it too far over my head. 

 

Thanks for your help in advance! 

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User

Here is an alternative way(MERGE Skill) proposed by me, Arthur.T, Matt.

 

http://support.sas.com/resources/papers/proceedings15/2785-2015.pdf

View solution in original post

3 REPLIES 3
Loko
Barite | Level 11

hello,

 

proc means specifications state that for out[n] - [n] is an integer between 1 and 100.

 

anyway the question is why you need something that will create 100 variables for each of

lflag rdflag mflag jflag ap var5 var14 adn nation variables ?

RW9
Diamond | Level 26 RW9
Diamond | Level 26

Totally agree with @Loko here, 130 * 9 = 1170 variables.  That is not the way forward regardless of any requirement.  

 

Alos, post example test data (in the form of a datastep) and what the output should look like if you need code.  But the question really is why you would need all those columns, as its really not going to work.

Ksharp
Super User

Here is an alternative way(MERGE Skill) proposed by me, Arthur.T, Matt.

 

http://support.sas.com/resources/papers/proceedings15/2785-2015.pdf

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1089 views
  • 2 likes
  • 4 in conversation