BookmarkSubscribeRSS Feed
SAS83
Fluorite | Level 6

Hi All,

I am having trouble in deleting extra 2 spaces in my Proc Report.

First thing I did is to check for duplicates in my category list and I did not find any.

Please help me to figure out the reason behind these spaces after the fourth category.

untitled.bmp

Thank you,

Ravi.

2 REPLIES 2
Cynthia_sas
SAS Super FREQ

hi:

  The extra space that you're seeing depends on several factors:

1) your PROC REPORT code -- you do not show your PROC REPORT code -- breaks and "skips" come from COMPUTE blocks and/or BREAK statements. Without seeing your code, it is impossible to "guess" what is happening.

2) your data -- again -- the BREAKS and COMPUTE blocks and possible line statements happen because of your code and your data

3) your destination. -- You say you are using PROC REPORT -- but are you also using ODS? Is this somethign that you are running as a stored process using Web Report Studio or is this something that you are running in Enterprise Guide or in SAS Display Manager??? It is impossible to see, from the tiny screen shot (with all missing values) what your destination of usage is -- SASReport, HTML, RTF, PDF?? Something else????

  If you are unable to post some sample data and your code, then I would suggest that you open a track with Tech Support so they can look at everything and help you find a solution.

cynthia

SAS83
Fluorite | Level 6

Cynthia,

Sorry, I could not share my code and sample data for you to understand my problem.

Let me explain you what I am doing and how I got rid of this issue.

Below are my answers to your questions:

2)I have used COMPUTE blocks to skip a row in the report.

3)I have used ODS to get my output in PDF.

Description:

Similar SAS dataset is constructed to make standard template

Data test;

infile cards DSD DLM=",";

input Catg $20. Rank Order;

cards;

Blue, 1, 1,

Red,1, 2,

Tiger,2,1

Lion,2,2

;

run;

I will then LEFT JOIN my real time data with TEST dataset with catg as my Key.

I got the right results with all categories in right format except one category where I see 2 more extra rows inserted. In first look, I though it might be some extra row blank data. But I did not find any duplicate errors.

Next thing I want to test is rearranging the categories.

I did rearrange the categories in my TEST dataset  and this issue was resolved. I still dont understand why.

Data test;

infile cards DSD DLM=",";

input Catg $20. Rank Order;

cards;

Tiger,1,1

Lion,1,2

Blue,2, 1,

Red,2, 2,

;

run;

Thanks for your valuable inputs.

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 2 replies
  • 1327 views
  • 3 likes
  • 2 in conversation