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

Hi

We use the following statement to write into log file…

%put ERROR: Dataset contains duplicate records.

Is there a way that I can write same on the listing file….

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Loko
Barite | Level 11

Hello,

%put macro statement only writes to the log. You can try generating a data _null_ statement with a put data step statement.

View solution in original post

5 REPLIES 5
Loko
Barite | Level 11

Hello,

%put macro statement only writes to the log. You can try generating a data _null_ statement with a put data step statement.

rakeshvvv
Quartz | Level 8

CAN YOU GIVE ME AN EXAMPLE......

Cynthia_sas
SAS Super FREQ

Hi:

  Here's an example. See attached screen shot. There's also a free e-lecture on the topic: SAS Training in the U.S. -- SAS Report Writing 1 e-Lectures: Additional Topics (Creating Data Step Reports with the LISTING Destination).

cynthia


data_null_to_listing.png
LearnByMistk
Obsidian | Level 7

data _null_;

x=4;

  if x<5 then ;

 

  %put Error:dataset has duplicates;

  run;

Ksharp
Super User

Why not use proc printto to save the LOG into a listing file ?

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!

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
  • 5 replies
  • 1085 views
  • 3 likes
  • 5 in conversation