<?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 Changing Field Attributes in SAS EG import step in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Changing-Field-Attributes-in-SAS-EG-import-step/m-p/958131#M45809</link>
    <description>&lt;P&gt;I need to change the field attributes for a lot many .csv files that I'm importing into SAS by the import step in a project. It's very cumbersome the way I'm doing it by modifying the import step, and getting to the field attributes and changing the values in the various columns - type, len, informat, format.&lt;/P&gt;
&lt;P&gt;Some files have a lot many variables so I need to take 2 or 3 screen shots....when I import the next .csv file, I have to keep the previous screen shot open and change accordingly. Sometimes I lose my place as it's a picture and I can't highlight anything to hold my spot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For some reason I cannot import these files programmatically in a data step and set the formats and informats as I need them...they have to be done as a step in the project.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Xinxin_0-1738619976775.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/104292iB640276A54D35118/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Xinxin_0-1738619976775.png" alt="Xinxin_0-1738619976775.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Xinxin_2-1738620083669.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/104294i3A58164A62DF96A5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Xinxin_2-1738620083669.png" alt="Xinxin_2-1738620083669.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for any help !!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 03 Feb 2025 22:08:51 GMT</pubDate>
    <dc:creator>Xinxin</dc:creator>
    <dc:date>2025-02-03T22:08:51Z</dc:date>
    <item>
      <title>Changing Field Attributes in SAS EG import step</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Changing-Field-Attributes-in-SAS-EG-import-step/m-p/958131#M45809</link>
      <description>&lt;P&gt;I need to change the field attributes for a lot many .csv files that I'm importing into SAS by the import step in a project. It's very cumbersome the way I'm doing it by modifying the import step, and getting to the field attributes and changing the values in the various columns - type, len, informat, format.&lt;/P&gt;
&lt;P&gt;Some files have a lot many variables so I need to take 2 or 3 screen shots....when I import the next .csv file, I have to keep the previous screen shot open and change accordingly. Sometimes I lose my place as it's a picture and I can't highlight anything to hold my spot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For some reason I cannot import these files programmatically in a data step and set the formats and informats as I need them...they have to be done as a step in the project.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Xinxin_0-1738619976775.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/104292iB640276A54D35118/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Xinxin_0-1738619976775.png" alt="Xinxin_0-1738619976775.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Xinxin_2-1738620083669.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/104294i3A58164A62DF96A5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Xinxin_2-1738620083669.png" alt="Xinxin_2-1738620083669.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for any help !!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2025 22:08:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Changing-Field-Attributes-in-SAS-EG-import-step/m-p/958131#M45809</guid>
      <dc:creator>Xinxin</dc:creator>
      <dc:date>2025-02-03T22:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Field Attributes in SAS EG import step</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Changing-Field-Attributes-in-SAS-EG-import-step/m-p/958134#M45810</link>
      <description>&lt;P&gt;Do the files all have the same columns in the same order?&lt;/P&gt;
&lt;P&gt;If so then you can avoid all of the pointing and clicking by writing a program to read the CSV file and then just call it with the name of the file to be read.&lt;/P&gt;
&lt;P&gt;If the files do not already exist on the server where SAS is running you can use the file upload task to copy the csv files to the SAS server before running the data step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2025 22:46:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Changing-Field-Attributes-in-SAS-EG-import-step/m-p/958134#M45810</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2025-02-03T22:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Field Attributes in SAS EG import step</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Changing-Field-Attributes-in-SAS-EG-import-step/m-p/958161#M45811</link>
      <description>&lt;P&gt;PROC Import, or the wizards that call it, does not have many options involving the types or properties of the variables. Basically only for EXCEL it has the option to force everything as text. Otherwise the programming in Proc Import makes GUESSES based on the contents of the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For CSV files the LOG will show the data step code that was generated (ugly and verbose but there) to read the csv. You could copy that from the log and paste into the editor then clean up for the given variables by removing line numbers, most of the Formats (dates, time or datetimes excepted) and adjusting the INFORMAT and FORMAT statements to the desired form. Then rerun the code. If multiple CSV have the same structure then change the file name and data set to read different files.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2025 04:45:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Changing-Field-Attributes-in-SAS-EG-import-step/m-p/958161#M45811</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2025-02-04T04:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Field Attributes in SAS EG import step</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Changing-Field-Attributes-in-SAS-EG-import-step/m-p/960323#M45842</link>
      <description>&lt;P&gt;Hi Xinxin,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Suggestions to consider that might be helpful:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1.) In the "Define Field Attributes" window&amp;nbsp; you can Ctrl+LeftMouse to select multiple data variables and modify them together. This is helpful when multiple columns need to be changed to the same attributes.&lt;/P&gt;
&lt;P&gt;See the first image below.&lt;/P&gt;
&lt;P&gt;2.) If you have multiple TEXT files that are identical in column name and attributes, only the data values are different, then, you can easily change the source data of the Import Data task then just run the Import task w/o having to redo the column attributes.&amp;nbsp; From the Process Flow window right-click on the source data and choose Properties to then Change the source.&lt;/P&gt;
&lt;P&gt;See the second image below.&lt;/P&gt;
&lt;P&gt;3.) You mentioned your technique was difficult to manage....something about not being able to see your screen shots.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; It seems you should just keep a word doc open to save each of your screen shots.&lt;/P&gt;
&lt;P&gt;4.) It is not clear why data step or proc import code was not working for you or why you were not able to do it for other reasons.&amp;nbsp;If you are getting errors about SAS not being able to find the file because it is on your local EG client pc and your SAS server is on a remote SASAPP metadata server, then, you could use Tasks &amp;gt; Data &amp;gt; Copy Files task which will allow you to copy one or more files from your EG client up to your SAS server....then run your datastep or proc import code referencing the directory on your SASAPP server.&lt;/P&gt;
&lt;P&gt;See the third image below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope that helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Bill&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BillSawyer_0-1740595904467.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/104973i02C7FD2614CE1AB9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BillSawyer_0-1740595904467.png" alt="BillSawyer_0-1740595904467.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BillSawyer_0-1740596555407.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/104974i9C8EA3CDF0D5E9FE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BillSawyer_0-1740596555407.png" alt="BillSawyer_0-1740596555407.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BillSawyer_1-1740597001712.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/104975i0C86A6B3CA343F62/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BillSawyer_1-1740597001712.png" alt="BillSawyer_1-1740597001712.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2025 19:12:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Changing-Field-Attributes-in-SAS-EG-import-step/m-p/960323#M45842</guid>
      <dc:creator>BillSawyer</dc:creator>
      <dc:date>2025-02-26T19:12:01Z</dc:date>
    </item>
  </channel>
</rss>

