BookmarkSubscribeRSS Feed
srinidelite
Obsidian | Level 7

 

Hi There ,

I'm looking forward to create a customized report just like below and i gotta two set's named SOURCE and TARGET ,..
Certainly im very new to SAS programming and struggling to use it in brinig out to the PROC_REPORT FORMAT .

I'certainly able to perform all of below in SQL (count , Dulpicates etc ) howver i'm not sure how to bring it them on this report

 

proc sql ;

select  count(*) as TO_NO_OF_RCD_IN_SRC 
from  src_ais.covprmtemp2b2w  ;
quit ;

proc sql ;
select  count(*) as TO_NO_OF_RCD_IN_TGT 
from  src_ais.covprmtgt2b2w  ;
quit ;

proc sql;
select distinct 0 as NO_OF_DUPES_SRC from src_ais.covprmtemp2b2w where not exists
(select cdnumpol,count(*) from src_ais.covprmtemp2b2w group by cdnumpol having count(*)>1)
;quit;
proc sql;
select distinct 0 as NO_OF_DUPES_TGT from src_ais.covprmtgt2b2w where not exists
select cdnumpol,count(*) from src_ais.covprmtgt2b2w group by cdnumpol having count(*)>1
;quit;
 

I was trying with PRC_REPORT however it doesnt helped me much ..

 

Total Number of Records in Source5245
Total Number of Records in Target5245
Total Number of Duplicate Records in Source0
Duplicate Records in Source0
Total Number of Duplicate Records in Target0
Duplicate Records in Target0
Total number of Rows missing in Source0
Total number of Rows missing in Target0
Total Number of Rows having Mismatches49
Total Number of Matching Rows5196
Total number of field level mismatches184
Total number of Records taken for comparison5245

 

Your Help is muc appriciated !

4 REPLIES 4
ballardw
Super User

Create tables such that you have a variable that holds the text of the description and the count, append the sets together, print.

Use the same variable names in all of the sets so columns align when displaying.

ballardw
Super User

@srinidelite wrote:
Can you please elaborate it?

Do you know how use a create table statement in SQL? That creates the separate data sets with the itens you need.

Then either a union or data step with set statement to combine the sets.

 

srinidelite
Obsidian | Level 7
Ya make sense.. Let me try and get back to you.

Thank you for the response.

##- Please type your reply above this line. Simple formatting, no
attachments. -##

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 895 views
  • 0 likes
  • 2 in conversation