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

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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
  • 628 views
  • 0 likes
  • 1 in conversation