<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: CSV file created from MXG in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/CSV-file-created-from-MXG/m-p/512793#M138138</link>
    <description>&lt;P&gt;Simplest thing would be to just add a PUT statement that runs only once.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_ ;
  FILE DMAN1 DELIMITER =';' DSD ;
  if _n_=1 then put 'System;CPUTMX;Program;Job;Date;Elapsed;ProcStep;Stepname';
  set extract ;
  put (system cputmx program job newdate elapsed procstep stepname)(+0) ;
run ;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 14 Nov 2018 00:33:09 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2018-11-14T00:33:09Z</dc:date>
    <item>
      <title>CSV file created from MXG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-file-created-from-MXG/m-p/512380#M137984</link>
      <description>&lt;P&gt;I'm new to SAS programming and I've&amp;nbsp;created a CSV file from a Mainframe MXG report. The CSV file doesn't have column headings and I'm trying to figure out how to make that happen.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what the CSV file looks like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ABC123ID;ICL226ID;DEF1234;STEP020;SYSC;12/12/2017;0.21;4.23&lt;/P&gt;&lt;P&gt;ABC123ID;ICL226ID;DFSRRC00;STEP010;SYSC;12/12/2017;57.61;1650.17&lt;/P&gt;&lt;P&gt;ABC123ID;CTRLIST;DEF1234;CONTROLR;SYSC;12/12/2017;0.29;1.10&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like it to look like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jobname&amp;nbsp; Procname Program Stepname System Date CPUTM Elapsed&lt;/P&gt;&lt;P&gt;ABC123ID;ICL226ID;DEF1234;STEP020;SYSC;12/12/2017;0.21;4.23&lt;/P&gt;&lt;P&gt;ABC123ID;ICL226ID;DFSRRC00;STEP010;SYSC;12/12/2017;57.61;1650.17&lt;/P&gt;&lt;P&gt;ABC123ID;CTRLIST;DEF1234;CONTROLR;SYSC;12/12/2017;0.29;1.10&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 12 Nov 2018 21:56:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-file-created-from-MXG/m-p/512380#M137984</guid>
      <dc:creator>dman1414</dc:creator>
      <dc:date>2018-11-12T21:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: CSV file created from MXG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-file-created-from-MXG/m-p/512382#M137985</link>
      <description>&lt;P&gt;How did you create the CSV file?&lt;/P&gt;
&lt;P&gt;Also wouldn't you want the line with the column headers to also include commas between the values?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Nov 2018 21:59:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-file-created-from-MXG/m-p/512382#M137985</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-11-12T21:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: CSV file created from MXG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-file-created-from-MXG/m-p/512760#M138122</link>
      <description>&lt;P&gt;//RPT01 EXEC MXGSASV9&lt;/P&gt;&lt;P&gt;//PDB1 DD DSN=ABC.MXG.PDB.WEEKLY.G1150V00,DISP=SHR&lt;/P&gt;&lt;P&gt;//DMAN1 DD DISP=(,CATLG),DSN=TEST.ABCTESTA.CSV,&lt;/P&gt;&lt;P&gt;// RECFM=VB,LRECL=27000,BLKSIZE=0,SPACE=(CYL,(20,10),RLSE)&lt;/P&gt;&lt;P&gt;//SYSIN DD *&lt;/P&gt;&lt;P&gt;options nodsnferr nosource2 ;&lt;/P&gt;&lt;P&gt;data extract&lt;/P&gt;&lt;P&gt;(keep=system cputmx program job newdate&lt;/P&gt;&lt;P&gt;elapsed procstep stepname);&lt;/P&gt;&lt;P&gt;set pdb1.steps&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;format cputmx 9.2 ;&lt;/P&gt;&lt;P&gt;format elapsed 12.2 ;&lt;/P&gt;&lt;P&gt;format newdate DDMMYYS10.;&lt;/P&gt;&lt;P&gt;where substr(JOB,1,8) in ('ABC226ID');&lt;/P&gt;&lt;P&gt;cputmx = cputm ;&lt;/P&gt;&lt;P&gt;elapsed = selapstm ;&lt;/P&gt;&lt;P&gt;newdate = datepart(termtime);&lt;/P&gt;&lt;P&gt;Data _null_ ;&lt;/P&gt;&lt;P&gt;FILE DMAN1 DELIMITER =';' DROPOVER ;&lt;/P&gt;&lt;P&gt;set extract ;&lt;/P&gt;&lt;P&gt;put (_ALL_)(+0) ;&lt;/P&gt;&lt;P&gt;run ;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Nov 2018 21:40:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-file-created-from-MXG/m-p/512760#M138122</guid>
      <dc:creator>dman1414</dc:creator>
      <dc:date>2018-11-13T21:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: CSV file created from MXG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-file-created-from-MXG/m-p/512793#M138138</link>
      <description>&lt;P&gt;Simplest thing would be to just add a PUT statement that runs only once.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_ ;
  FILE DMAN1 DELIMITER =';' DSD ;
  if _n_=1 then put 'System;CPUTMX;Program;Job;Date;Elapsed;ProcStep;Stepname';
  set extract ;
  put (system cputmx program job newdate elapsed procstep stepname)(+0) ;
run ;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 14 Nov 2018 00:33:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-file-created-from-MXG/m-p/512793#M138138</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-11-14T00:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: CSV file created from MXG</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CSV-file-created-from-MXG/m-p/513356#M138311</link>
      <description>Thanks that resolved my issue.</description>
      <pubDate>Thu, 15 Nov 2018 15:10:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CSV-file-created-from-MXG/m-p/513356#M138311</guid>
      <dc:creator>dman1414</dc:creator>
      <dc:date>2018-11-15T15:10:43Z</dc:date>
    </item>
  </channel>
</rss>

