Data visualization with SAS programming

proc gchart issue

Reply
Contributor
Posts: 31

proc gchart issue

rsubmit;

proc printto print='/home/*****/prdsale';

proc sort data=unixlib.PRDSALE out=prdsale;

by region;

run;

proc gchart data=unixlib.prdsale;

vbar country / sumvar=actual discrete;

by region;

run;

quit;

endrsubmit;

I am remote submitting above code from mainframe to unix and prdsale has been creating with '0' records. please find the below detials of unix. Please advise is there any thing am I missing. Your help would be much appreciated.

0 Jul 22 02:26 prdsale

SAS Super FREQ
Posts: 8,819

Re: proc gchart issue

Hi: Proc PRINTTO captures procedure output that would normally go to the LISTING window (or that might be considered a VISIBLE report). With the code you show, there is NOTHING going to the LISTING window. PROC SORT only writes messages to the LOG and PROC GCHART will write to a Graph catalog and then to the interactive GRAPH window. PROC PRINTTO is just an ASCII text file. So it will not, for example, be able to hold an IMAGE file created by GCHART, such as PDF, RTF or HTML would be able to do.
      

  Have you tried using ODS??? Assuming you have write access to the HOME directory, you should be able to create files in that location using ODS:
       

rsubmit;

 

** try SASHELP.PRDSALE instead of UNIXLIB.PRDSALE as a test;

proc sort data=sashelp.PRDSALE out=prdsale;

by region;

run;

 

** use ODS instead of PROC PRINTTO;

ods pdf file='/home/*****/prdsale_test.pdf';

ods rtf file='/home/*****/prdsale_test.rtf';

ods html path='/home/*****/' (url=none) file='prdsale_test.html';

proc gchart data=prdsale;

vbar country / sumvar=actual discrete;

by region;

run;

quit;

ods _all_ close;

** then go look in the /home directory to find the files;

    

endrsubmit;
   

I do not have a Unix system to test with using RSUBMIT/ENDRSUBMIT -- but when I tested the code on my UNIX system using SASHELP.PRDSALE, I did successfully get 3 output files in my defined directory.

  So if you need help getting the path correct, you may need to work with Tech Support on that.


     cynthia

Ask a Question
Discussion stats
  • 1 reply
  • 309 views
  • 0 likes
  • 2 in conversation