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

I have the following data step:

Data _null_;

Set SHPR;

File "C:\shpr.txt" Lrecl = 900;

Put @1 SPCODE 2.

             Total10-Total20 13.4;

Run;

This produces data in the text file like so:

20 0 0 0 0 0 0 0 0 0        0.0000

30 0 0 0 0 0 0 0 0 0        0.0000

20 0 0 0 0 0 0 0 0 0        0.0000

Clearly, what is happening is that it outputs the variables Total10-Total19 just as zero, and outputs the variable Total20 with the numeric format 13.4.

I want all of those variables Total10-Total20 to be output with the numeric format 13.4. Is there a way for me to do this without me having to specify all

of the variables individually? The above is a snippet of my code - there are several hundred of these "Total" variables.

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
art297
Opal | Level 21

Just add a couple of parentheses.  e.g.

(Total10-Total20) (13.4);

View solution in original post

1 REPLY 1
art297
Opal | Level 21

Just add a couple of parentheses.  e.g.

(Total10-Total20) (13.4);

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!

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
  • 1 reply
  • 597 views
  • 0 likes
  • 2 in conversation