BookmarkSubscribeRSS Feed
geethak
Calcite | Level 5

Hi,I am trying to work out on listings.

 

after the use of ods listing,the data which is written in editor is not execuint,it simply printing the same in log file,

Guys please let me know why,when and how it happens.

and how to solve the issue.

I'ts not working even to print the sashelp.class data also;

 

 

ods listing close;
ods pdf file ="C:\Users\raj\Desktop\report5\report5.1.pdf";
proc report data=MAIN_PR nowd headline headskip;
title1 " Listing 16.2.4.5";
title2 " Virology (ADVATE Only Subjects)";
title3 " ";
title4 " ";
title5 " ";
title6 " ";
title7 " ";
title8 "Study Group: PTP <then PUP>" ;

COLUMN ("--" SBJID EX_BL_C1 TEST POSITVE_TIME TH_CON );


define SBJID/order 'Subject ID' width=8 ;
define EX_BL_C1/DISPLAY'EXPOSURE OF BLOOD COMPONENT' width=6;
define TEST/DISPLAY 'TEST RESULT' width=20 ;
define POSITVE_TIME/DISPLAY 'FIRST POSITVE TIME' width=10;
define TH_CON/DISPLAY 'Whether Therapy is Conducted?' width=8;


break after SBJID/skip;
compute after;
line @5 '________________________________________________________________________________________________________';
line 20*'__';
line'';
line @5'Abbreviations:' ;
line @5'PTP=previously treated population; PUP=previously untreated ';
line @5'population.';

 

endcomp;
run;
ods pdf close;
ods listing close;

 

/****************

proc print data=sashelp.class;

run;

*********************/

 

The same it is printing  in the log file without generating the output

8 REPLIES 8
art297
Opal | Level 21

Could it be that your final

ods listing close;

just before the proc print, should have been:

ods listing;

Art, CEO, AnalystFinder.com

 

Reeza
Super User

There’s likely something that messed it up, unbalanced quotes or incorrectly terminated line. 

 

Try restarting your session and re-running the code to see if the issue persists. Check a different piece of code before you run the code that you think is causing the issue. 

 

If it persists you likely have an issue with your code. Look at the colours to see if something isn’t coloured correctly as a starting point. 

ballardw
Super User

@geethak wrote:

Hi,I am trying to work out on listings.

 

after the use of ods listing,the data which is written in editor is not execuint,it simply printing the same in log file,

Guys please let me know why,when and how it happens.

and how to solve the issue.

I'ts not working even to print the sashelp.class data also;

  

The same it is printing  in the log file without generating the output


You do not show the line you are getting from the log. If it looks like:

WARNING: No output destinations active.

Then the cause is you are requesting output, such as from Proc Print or Proc Report but you have Closed all of the ODS Destinations and likely @art297's response is the answer.
 

 

geethak
Calcite | Level 5
Yeah, I am getting that issue also.

Please tell me how to resolve or get back out of it..
art297
Opal | Level 21

run the line:

ods listing;

As I mentioned, before, toward the end of your code you close the ods listing

 

Art, CEO, AnalystFinder.com

 

geethak
Calcite | Level 5
I tried, but it doesn’t worked for me.
Again the whole code is printing in the log file.
Reeza
Super User

1. Did you restart SAS?
2. In a fresh session, what happens when you submit the following, please post the full log:

 

proc print data=sashelp.class;
run;
ballardw
Super User

@geethak wrote:
Yeah, I am getting that issue also.

Please tell me how to resolve or get back out of it..

 

with the no destinations warning you have to open at least one of the ODS destinations before requesting any output to either the Listing or results window.

 

Ods LIsting;

proc print data=sashelp.class;

run;

or

Ods  html;

proc print data=sashelp.class;

run;

 

or even send to a file such as with ODS RTF or ODS PDF.

 

 

Show your log with the code submitted from your ODS destination statement to through the warnings, notes or errors after the proc print or report. Paste into a code box opened with the forum {I} menu icon to preserver formatting from the log as some of the diagnostics are position dependent and the main message windows will reformat the text.

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