BookmarkSubscribeRSS Feed
JJP1
Pyrite | Level 9

Hi Team,

Iam running the code in which using proc transpose procure.but here the step gets failed .Error is "No columns are available "

Actually error is clear that there are no columns in that dataset which is being transposed.

but these columns are getting created using the data coming from the  dataset .

 

Actually i have dataset having columns called "Name" which has data values "JOHN" "JAMES" "PETER" "PAUL" "RUTH" "DAVID"

 

so after this step running proc transpose statemnet where we are using above columns values (john,james..) are converting to columns.

problem here is there is no name values ("JOHN" "JAMES" "PETER" "PAUL" "RUTH" "DAVID") in test environmnet and present in live environmnet,so iam running this code in test enviornmet and getting error under porc_tranpose step saying "no columns present"

 

Would you please help how can we optimise the code in such a way that it will handle this scenario please

 

4 REPLIES 4
ChrisNZ
Tourmaline | Level 20

Please provide before/after data, as well as the code you tried.

JJP1
Pyrite | Level 9

HI @ChrisNZ ,

 

kindly find below core where we are getting error like john is not present,james is not present.

 

proc transpose data=namedetails out=trans_name(drop=_name_ _label_);
by id;
var count;
id name;
run;

JJP1
Pyrite | Level 9

HI @ChrisNZ ,

 

kindly find below sample code where we are getting error like john is not present,james is not present.

 

proc transpose data=namedetails out=trans_name(drop=_name_ _label_);
by id;
var count;
id name;
run;
ballardw
Super User

Proc Transpose is very data sensitive. Provide example input data that causes the error messages.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 4 replies
  • 1200 views
  • 0 likes
  • 3 in conversation