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.

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1916 views
  • 0 likes
  • 3 in conversation