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

Hello,

 

I am trying to add label titles to a data proc. Any help is appreciated thanks.

 

 

data printe (keep=sdate t1_ts t2_ts t3_ts t4_ts t5_ts uow
recpname recpback maxrcrsn
t2_t1 t3_t2 t4_t3 t5_t4 t5_t1 intfbe
entries );
set recpresp;
file recpdtl noprint;
put @1 recpname $20.
@23 t1_ts time13.4
@38 t5_ts time13.4
@52 t5_t1 9.5
@63 entries $2.
@68 uow $12.
@81 recpback $10.
@91 maxrcrsn $4.
@95 t2_t1 9.5
@103 t3_t2 9.5
@111 t4_t3 9.5
@119 t5_t4 9.5
@131 intfbe $30.
;

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

Your data step is confusing.  You are creating a new dataset by setting an existing dataset. And you are also writing lines to a text file.

 

What part of it needs labels?

View solution in original post

2 REPLIES 2
Kurt_Bremser
Super User

SAS works in steps. The steps can either be data or procedure (proc) steps. Wich means there is no data proc in SAS.

 

Do you want to assign a label to the dataset created by the data step, or to variables in that dataset? Both is possible.

data new (label='Dataset Label');
set xx;
label
  a = 'Label for Variable A'
;
........
run;
Tom
Super User Tom
Super User

Your data step is confusing.  You are creating a new dataset by setting an existing dataset. And you are also writing lines to a text file.

 

What part of it needs labels?

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 620 views
  • 0 likes
  • 3 in conversation