BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
France
Quartz | Level 8

dear all,

 

how can I show the full length of a numeric value created by proc freq, the result looks like following,

 

Frequency

Percent

Row Pct

Col Pct

Table 2 of granted by publn_first_grant

Controlling for ipr_type=PI

granted

publn_first_grant

0

1

Total

0

2.549E7

43.61

100.00

64.75

0

0.00

0.00

0.00

2.549E7

43.61

 

 

1

1.388E7

23.74

42.10

35.25

1.908E7

32.65

57.90

100.00

3.296E7

56.39

 

 

Total

3.936E7

67.35

1.908E7

32.65

5.845E7

100.00

 

It is created by following codes,

 

proc freq data=Step2.appln_new;

  table ipr_type*granted*publn_first_grant;

run;

how can I show the full length of 1.908E7? Could you please give me some suggestion about this?

 

thanks in advance.

 

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Other options (within PROC FREQ) include:

  • the LIST option of the TABLES statement:
    table ipr_type*granted*publn_first_grant / list;
  • creating an output dataset, e.g. with the OUT= option of the TABLES statement (which can then be printed).

View solution in original post

3 REPLIES 3
Jagadishkatam
Amethyst | Level 16

 

Please try the proc freq template to control the formats.

 

ODS PATH RESET;                              
ODS PATH (PREPEND) WORK.Templat(UPDATE) ;    
                                             
PROC TEMPLATE;                               
  EDIT Base.Freq.OneWayList;                 
    EDIT Frequency;                          
      FORMAT = best.;                      
    END;                                     
    EDIT CumFrequency;                       
      FORMAT = best.;                      
    END;                                     
    EDIT Percent;                            
      FORMAT = best.;                          
    END;                                     
    EDIT CumPercent;                         
      FORMAT = best.;                          
    END;                                     
  END;                                       
RUN;
proc freq data=Step2.appln_new;
  table ipr_type*granted*publn_first_grant;
run;

 

Thanks,
Jag
FreelanceReinh
Jade | Level 19

Other options (within PROC FREQ) include:

  • the LIST option of the TABLES statement:
    table ipr_type*granted*publn_first_grant / list;
  • creating an output dataset, e.g. with the OUT= option of the TABLES statement (which can then be printed).
ballardw
Super User

Another approach would be to use the NOPRINT option in proc freq and send the result to a data set. Then you have all the power of proc print for displaying values.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 3 replies
  • 1745 views
  • 0 likes
  • 4 in conversation