BookmarkSubscribeRSS Feed
gauravp1993
Obsidian | Level 7

Hello,

 

I am trying to create a table using data step and then using proc print data and it contains for example, 10 values corresponding to a single row in one column separated by commas. so i tried the following code to shift values to next line (not in next row,in the same row next line ) i.e. carriarge return, in case of more than two values.

 

%if %sysfunc(mod(&i.,2)) = 0 %then xyz=strip(xyz)||"'"||strip(pqr)||"',"||'0A'x;
%else xyz=strip(xyz)||"'"||strip(pqr)||"',";;
call symput('xyz',strip(xyz));

 

so when i run this code in EG it shows correct values, two in one line, 5 lines in total. but when i run same sp in VA, it shows output in one row with all 10 values. 

when i checked log i VA, it showed values in same pattern as seen in EG, but it is not being given in VA output.

Is there any solution for this or is it any limitation?

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 0 replies
  • 669 views
  • 0 likes
  • 1 in conversation