Desktop productivity for business analysts and programmers

ODS CSVALL - variable filenames when using NEWFILE

Reply
Occasional Contributor
Posts: 17

ODS CSVALL - variable filenames when using NEWFILE

ODSCSVHi all,

I am trying to get the below summary table report to output to a folder which works fine and this creates 175 different .csv files but the name of the file is FILENAME1, FILENAME2, FILENAME3 etc... what I want the filename to be the variable called TABLE which is linked to the page dimension variable - PROCODED

How do I get the filename to be parameterised based on the PROCODED variable????

Thanks

S

ods _all_ close;

ods CSVALL file="\\TEST.SAMPLE\IC_User_DFS\PDrive\SHudsoo\S Hudson Documents\Test\FILENAME.csv"

newfile=TABLE;

PROC TABULATE

DATA=WORK.QUERY_FOR_SHDQ_APC_DUPL_TBL_0000

     OUT=WORK.STABSummaryTablesQUERY_FOR_SHDQ_(LABEL="Summary Tables  for WORK.QUERY_FOR_SHDQ_APC_DUPL_TBL_0000")

    

     ;

    

     VAR Calculation;

     CLASS EPISODE_END_GROUP /  ORDER=UNFORMATTED MISSING;

     CLASS SUBDATE / ORDER=UNFORMATTED MISSING;

     CLASS PROCODED /     ORDER=UNFORMATTED MISSING;

     TABLE /* Page Dimension */

PROCODED,

/* Row Dimension */

SUBDATE*

  N

ALL={LABEL='Total (ALL)'}*

  N,

/* Column Dimension */

EPISODE_END_GROUP

ALL={LABEL='Total (ALL)'}       ;

     ;

RUN;

ods _all_ close;

Ask a Question
Discussion stats
  • 0 replies
  • 479 views
  • 0 likes
  • 1 in conversation