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
Could it be that your final
ods listing close;
just before the proc print, should have been:
ods listing;
Art, CEO, AnalystFinder.com
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.
@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.
run the line:
ods listing;
As I mentioned, before, toward the end of your code you close the ods listing
Art, CEO, AnalystFinder.com
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;
@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.
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!
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.