<?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: Accessing the sas file converted from .xpt in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/795928#M255358</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/416543"&gt;@Tejaswini3&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thankyou for the reply.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to recreate the format? I have format file in .xpt and as dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;libname library 'path';&lt;BR /&gt;options fmtsearch=(library.format_raw);&lt;BR /&gt;proc format cntlin=library.format_raw;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;data PKDMG;&lt;BR /&gt;merge bapk (in=a) DMG (in=b);&lt;BR /&gt;keep country sex DOB1D race;&lt;BR /&gt;format formats.;&lt;BR /&gt;run;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That is not going to work.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First told it to use a CATALOG named FORMAT_RAW in the directory pointed to by LIBRARY as the place to look for formats.&amp;nbsp; Does that CATALOG actually exist?&lt;/P&gt;
&lt;P&gt;Then you told it to use a DATASET named FORMAT_RAW as input to PROC FORMAT to create a CATALOG named WORK.FORMATS.&amp;nbsp; Does that DATASET actually exist?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have a dataset named FORMAT_RAW you can use it in one of two ways.&lt;/P&gt;
&lt;P&gt;Leave the FMTSEARCH option alone so that it will search the WORK.FORMATS catalog your PROC FORMAT step is creating.&lt;/P&gt;
&lt;P&gt;Or&amp;nbsp;use the LIB=LIBRARY.FORMAT_RAW option on the PROC FORMAT statement to tell it where to write the catalog so that your modified FMTSEARCH option setting will search it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 13 Feb 2022 14:42:26 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2022-02-13T14:42:26Z</dc:date>
    <item>
      <title>Accessing the sas file converted from .xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/795882#M255331</link>
      <description>&lt;P&gt;/*Import XX.xpt file*/&lt;BR /&gt;libname xptfile xport 'path\XX.xpt';&lt;BR /&gt;libname sasfile 'destination path';&lt;BR /&gt;proc copy inlib=xptfile outlib=sasfile;&lt;BR /&gt;run;&lt;BR /&gt;proc copy inlib=xptfile outlib=sasfile;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the above code, the sasfile is created but not able to successfully open the file to check the content. Kindly help for any additional or deletion of syntax&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To check and store the created dataset in above code had created below code but still not working but the plus point is that am able to check the table properties.&lt;/P&gt;&lt;P&gt;/*Storing in AA dataset*/&lt;/P&gt;&lt;P&gt;libname trial 'Destination path';&lt;BR /&gt;data trial.demo;&lt;BR /&gt;set xx;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After writing above code following error is coming&lt;/P&gt;&lt;P&gt;The format BTPU11_ was not found or could not be loaded&lt;/P&gt;</description>
      <pubDate>Sun, 13 Feb 2022 06:24:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/795882#M255331</guid>
      <dc:creator>Tejaswini3</dc:creator>
      <dc:date>2022-02-13T06:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the sas file converted from .xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/795883#M255332</link>
      <description>&lt;P&gt;The dataset uses a custom format.&lt;/P&gt;
&lt;P&gt;To make the dataset usable, use&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options nofmterr;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;To recreate the format, request the PROC FORMAT code from the source.&lt;/P&gt;</description>
      <pubDate>Sun, 13 Feb 2022 06:29:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/795883#M255332</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-02-13T06:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the sas file converted from .xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/795926#M255356</link>
      <description>&lt;P&gt;Thankyou for the reply.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to recreate the format? I have format file in .xpt and as dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname library 'path';&lt;BR /&gt;options fmtsearch=(library.format_raw);&lt;BR /&gt;proc format cntlin=library.format_raw;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;data PKDMG;&lt;BR /&gt;merge bapk (in=a) DMG (in=b);&lt;BR /&gt;keep country sex DOB1D race;&lt;BR /&gt;format formats.;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Feb 2022 14:31:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/795926#M255356</guid>
      <dc:creator>Tejaswini3</dc:creator>
      <dc:date>2022-02-13T14:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the sas file converted from .xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/795928#M255358</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/416543"&gt;@Tejaswini3&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thankyou for the reply.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How to recreate the format? I have format file in .xpt and as dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;libname library 'path';&lt;BR /&gt;options fmtsearch=(library.format_raw);&lt;BR /&gt;proc format cntlin=library.format_raw;&lt;BR /&gt;quit;&lt;/P&gt;
&lt;P&gt;data PKDMG;&lt;BR /&gt;merge bapk (in=a) DMG (in=b);&lt;BR /&gt;keep country sex DOB1D race;&lt;BR /&gt;format formats.;&lt;BR /&gt;run;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That is not going to work.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First told it to use a CATALOG named FORMAT_RAW in the directory pointed to by LIBRARY as the place to look for formats.&amp;nbsp; Does that CATALOG actually exist?&lt;/P&gt;
&lt;P&gt;Then you told it to use a DATASET named FORMAT_RAW as input to PROC FORMAT to create a CATALOG named WORK.FORMATS.&amp;nbsp; Does that DATASET actually exist?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have a dataset named FORMAT_RAW you can use it in one of two ways.&lt;/P&gt;
&lt;P&gt;Leave the FMTSEARCH option alone so that it will search the WORK.FORMATS catalog your PROC FORMAT step is creating.&lt;/P&gt;
&lt;P&gt;Or&amp;nbsp;use the LIB=LIBRARY.FORMAT_RAW option on the PROC FORMAT statement to tell it where to write the catalog so that your modified FMTSEARCH option setting will search it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Feb 2022 14:42:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/795928#M255358</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-02-13T14:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the sas file converted from .xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/796060#M255412</link>
      <description>&lt;P&gt;To recreate a format, you need either&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;the PROC FORMAT code that created the format (preferred)&lt;/LI&gt;
&lt;LI&gt;a CNTLIN dataset for PROC FORMAT for automated creation (next best option)&lt;/LI&gt;
&lt;LI&gt;a catalog containing the format (least preferred, because catalogs are platform- and SAS version dependent)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;A CNTLIN dataset has (at least) the columns fmtname, start and label.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC FORMAT is a procedure that needs a RUN;, not a QUIT;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So which types of SAS files are contained in your XPT file? Only datasets (then look for one with the above mentioned structure) or catalogs also?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 14:33:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/796060#M255412</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-02-14T14:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the sas file converted from .xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/796092#M255419</link>
      <description>&lt;P&gt;Thankyou sir for the reply. But still i am facing issue in it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you please help me with draft code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be a great help. I want to use the format sasfile in a data step&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 17:15:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/796092#M255419</guid>
      <dc:creator>Tejaswini3</dc:creator>
      <dc:date>2022-02-14T17:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the sas file converted from .xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/796123#M255433</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/416543"&gt;@Tejaswini3&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thankyou sir for the reply. But still i am facing issue in it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you please help me with draft code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would be a great help. I want to use the format sasfile in a data step&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;What type of "format sasfile" do you have?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have XPT file that contains SAS V5 transport files so that your original code that use the XPORT libname engine works then the only types of file that can contain are SAS datasets.&lt;/P&gt;
&lt;P&gt;How many dataset where in the XPT file? The SAS log from your PROC COPY step should show you the names of the files that were copied out of the XPT file.&amp;nbsp; &amp;nbsp;If the PROC COPY step generated an error reading from the XPT file then you do not have a SAS V5 transport file.&amp;nbsp; If you have a file created by PROC CPORT then it could contain a format catalog.&amp;nbsp; You would need to use PROC CIMPORT to read such a file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If one the SAS dataset has a name that makes your think it might have the format definitions then take a look at what it has in it it.&amp;nbsp; Run PROC CONTENTS to see what the variables are.&amp;nbsp; Run PROC PRINT or a simple data step like below to see what some of the values look like.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Say you have a dataset named SASFILE.FORMAT_NEW.&amp;nbsp; To look at some of the values you could run this code to dump the values of the variables in the first three observations to the SAS log.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  set sasfile.format_new (obs=3);
  put (_all_) (=/);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 19:43:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/796123#M255433</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-02-14T19:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the sas file converted from .xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/796328#M255521</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Convert .xpt file to sas dataset format&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;libname xptfile xport 'path\formats.xpt';&lt;BR /&gt;libname sasfile 'path';&lt;BR /&gt;proc copy inlib=xptfile outlib=sasfile;&lt;BR /&gt;options nofmterr;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Dataset code where want to read the file with the help of formats&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;data trial;&lt;BR /&gt;merge Y (in=a)&amp;nbsp; X (in=b);&lt;BR /&gt;keep country sex DOB1D race;&lt;BR /&gt;format country CHIP11. sex SEX11_. DOB1D ETH11_. race RCE51_.;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Here in this file, the format&amp;nbsp;CHIP11. and others are from formats file. Still not able to read it.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Feb 2022 16:37:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/796328#M255521</guid>
      <dc:creator>Tejaswini3</dc:creator>
      <dc:date>2022-02-15T16:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the sas file converted from .xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/796344#M255529</link>
      <description>&lt;P&gt;What is your "formats file"?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Feb 2022 17:03:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/796344#M255529</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-02-15T17:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the sas file converted from .xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/796349#M255534</link>
      <description>&lt;P&gt;Please post the SAS log from running this step so we can tell whether the LIBNAME and PROC COPY step worked. And if they did what datasets were found in the XPT file.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options nofmterr;
libname xptfile xport 'path\formats.xpt';
libname sasfile 'path';
proc copy inlib=xptfile outlib=sasfile;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Copy the lines from the SAS log and paste into the window that pops up when you push the Insert Code icon (The icon looks like the characters &amp;lt; / &amp;gt; ).&amp;nbsp; You might want to remove the actual physical path from the log rather than post it on-line. But make sure to do it in the pop-up window so that the formatting of the lines from the SAS log is preserved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the PROC COPY step actually created a dataset then also run PROC CONTENTS on the dataset it created so we can see if it looks like a dataset that could actually define your formats.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Feb 2022 17:23:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/796349#M255534</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-02-15T17:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the sas file converted from .xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/797256#M255913</link>
      <description>I am able to convert the format file into .sas7bdat.&lt;BR /&gt;Using proc content code able to see the content.&lt;BR /&gt;The only doubt is how to use this format datafile while reading a different dataset</description>
      <pubDate>Fri, 18 Feb 2022 15:57:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/797256#M255913</guid>
      <dc:creator>Tejaswini3</dc:creator>
      <dc:date>2022-02-18T15:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the sas file converted from .xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/797272#M255924</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/416543"&gt;@Tejaswini3&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;I am able to convert the format file into .sas7bdat.&lt;BR /&gt;Using proc content code able to see the content.&lt;BR /&gt;The only doubt is how to use this format datafile while reading a different dataset&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So you have a dataset that you think describes the formats?&amp;nbsp; What does it look like?&amp;nbsp; Does it look like the dataset that PROC FORMAT creates with CNTLOUT= option?&amp;nbsp; If not could you convert it into one?&amp;nbsp; The key things you need to define a format are the name for the format, the raw or uncoded value and the display or coded value. FMTNAME, START, LABEL are the variable names you will need for that informat.&amp;nbsp; Remember that a format name cannot end with a digit.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do the values mentioned in the format definition look like the values in the dataset variables that are supposed to use those formats?&amp;nbsp; You can use NOFMTERR option to allow you to look a the dataset that has a permanently attached format that your current session cannot find. You can use a FORMAT statement that lists variable(s) without any format specification after them to remove a permanently attached format so that you can print the actual values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have the information to define the formats then you can use PROC FORMAT to create a format catalog from the data. Use the FMTSEARCH option to tell SAS to look for format there.&amp;nbsp; Then use the formats with the actual data you have.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get detailed help you need to provide detail information.&amp;nbsp; Show the lines from your SAS log of the code you tried. Show the content information of the format dataset.&amp;nbsp; Show some of the values. Show the content information of the dataset that needs to use the format.&amp;nbsp; Show some of the values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2022 16:44:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/797272#M255924</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-02-18T16:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the sas file converted from .xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/797625#M313583</link>
      <description>&lt;P&gt;Thankyou sir.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly find below screenshot of format file in .sas7bdat format. I want to use this format file in some other dataset. the resulting dataset which have usage of different sas data process. Kindly help.&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="Tejaswini3_0-1645463609983.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/68723iE68B08C481E636BC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tejaswini3_0-1645463609983.png" alt="Tejaswini3_0-1645463609983.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 17:16:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/797625#M313583</guid>
      <dc:creator>Tejaswini3</dc:creator>
      <dc:date>2022-02-21T17:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the sas file converted from .xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/797629#M313587</link>
      <description>&lt;P&gt;Hard to tell since you posted a photograph of something that appears to be using the LABEL as the column header instead of the NAME of the variable.&amp;nbsp; But it looks like that is valid for use with PROC FORMAT.&amp;nbsp; Try it.&lt;/P&gt;
&lt;P&gt;So if you converted that XPT file into the WORK.FORMATS dataset you could run this code to create the formats in the WORK.FORMATS catalogs.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format cntlin=formats;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then you could try running PROC FREQ on one of your variables that is using that DART11_ format that it looks like your dataset contains.&amp;nbsp; So if you have a dataset name HAVE with a variable named DART11 you might use&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=HAVE;
  tables dart11 ;
  format dart11 dart11_. ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;To see the raw values remove the format from the variable.&amp;nbsp; So run code like this and compare to the previous table.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=HAVE;
  tables dart11 ;
  format dart11  ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Feb 2022 17:48:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/797629#M313587</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-02-21T17:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the sas file converted from .xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/797973#M313749</link>
      <description>data trial;&lt;BR /&gt;merge Y (in=a) X (in=b);&lt;BR /&gt;keep country sex DOB1D race;&lt;BR /&gt;format country sex DOB1D race;&lt;BR /&gt;run;&lt;BR /&gt;By writing this code I am able to merge the dataset. But the problem is if I want to perform some other process on trial and in log 'xxx format cannot be identified'.&lt;BR /&gt;Kindly help</description>
      <pubDate>Wed, 23 Feb 2022 09:53:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/797973#M313749</guid>
      <dc:creator>Tejaswini3</dc:creator>
      <dc:date>2022-02-23T09:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the sas file converted from .xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/797980#M313752</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/416543"&gt;@Tejaswini3&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thankyou sir.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kindly find below screenshot of format file in .sas7bdat format. I want to use this format file in some other dataset. the resulting dataset which have usage of different sas data process. Kindly help.&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="Tejaswini3_0-1645463609983.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/68723iE68B08C481E636BC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tejaswini3_0-1645463609983.png" alt="Tejaswini3_0-1645463609983.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Run&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format cntlin=dataset;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;where dataset is this dataset you show here, and then try to open/use your other dataset(s) again.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 10:08:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/797980#M313752</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-02-23T10:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the sas file converted from .xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/798027#M313770</link>
      <description>&lt;P&gt;Kindly see the error in log file and suggest the solution&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="Tejaswini3_0-1645623893643.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/68769i5E7616B7A5E8DE5C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tejaswini3_0-1645623893643.png" alt="Tejaswini3_0-1645623893643.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 13:45:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/798027#M313770</guid>
      <dc:creator>Tejaswini3</dc:creator>
      <dc:date>2022-02-23T13:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the sas file converted from .xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/798032#M313772</link>
      <description>&lt;P&gt;Please post text as text and not as photographs!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your photograph does not show any attempt to define the formats.&amp;nbsp; Did the dataset you posted the photograph of before work as a CNTLIN= dataset in PROC FORMAT step?&amp;nbsp; Did the log show it creating any of the formats named in the errors message in your photograph of the data step?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why are you referencing variables in the KEEP and FORMAT statements that do not exist?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 14:22:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/798032#M313772</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-02-23T14:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the sas file converted from .xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/798039#M313777</link>
      <description>&lt;P&gt;Always (as in &lt;FONT size="5"&gt;&lt;STRONG&gt;ALWAYS&lt;/STRONG&gt;&lt;/FONT&gt;) post logs by copy/pasting the log text directly into a window opened with this button:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54552i914D97BE1B0F21E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;There is absolutely no need to take a screenshot and insert the picture, copy/pasting is much easier for you and the text is much easier to read and commentate on.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do not see the PROC FORMAT code I gave you.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 14:46:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/798039#M313777</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-02-23T14:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing the sas file converted from .xpt</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/798070#M313783</link>
      <description>&lt;P&gt;Log file&lt;/P&gt;&lt;P&gt;11 libname sasfile 'D:\SAS\Project\Project 3- Interating Data&lt;BR /&gt;11 ! for PKAnalysis\Project 3- Interating Data for&lt;BR /&gt;11 ! PKAnalysis\Work\04utility';&lt;BR /&gt;NOTE: Libref SASFILE was successfully assigned as follows:&lt;BR /&gt;Engine: V9&lt;BR /&gt;Physical Name: D:\SAS\Project\Project 3- Interating Data&lt;BR /&gt;for PKAnalysis\Project 3- Interating Data for&lt;BR /&gt;PKAnalysis\Work\04utility&lt;BR /&gt;12 proc copy inlib=xptfile outlib=sasfile;&lt;BR /&gt;NOTE: Writing HTML Body file: sashtml.htm&lt;BR /&gt;13 run;&lt;/P&gt;&lt;P&gt;NOTE: Input library XPTFILE is sequential.&lt;BR /&gt;NOTE: Copying XPTFILE.DMG to SASFILE.DMG (memtype=DATA).&lt;BR /&gt;NOTE: BUFSIZE is not cloned when copying across different&lt;BR /&gt;engines. System Option for BUFSIZE was used.&lt;BR /&gt;NOTE: There were 25 observations read from the data set&lt;BR /&gt;XPTFILE.DMG.&lt;BR /&gt;NOTE: The data set SASFILE.DMG has 25 observations and 14&lt;BR /&gt;variables.&lt;BR /&gt;NOTE: PROCEDURE COPY used (Total process time):&lt;BR /&gt;real time 6.37 seconds&lt;BR /&gt;cpu time 0.50 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;14 options nofmterr;&lt;/P&gt;&lt;P&gt;15 libname xptfile xport 'D:\SAS\Project\Project 3- Interating&lt;BR /&gt;15 ! Data for PKAnalysis\Project 3- Interating Data for&lt;BR /&gt;15 ! PKAnalysis\Work\02data_raw\formats.xpt';&lt;BR /&gt;NOTE: Libref XPTFILE was successfully assigned as follows:&lt;BR /&gt;Engine: XPORT&lt;BR /&gt;Physical Name: D:\SAS\Project\Project 3- Interating Data&lt;BR /&gt;for PKAnalysis\Project 3- Interating Data for&lt;BR /&gt;PKAnalysis\Work\02data_raw\formats.xpt&lt;BR /&gt;16 libname sasfile 'D:\SAS\Project\Project 3- Interating Data&lt;BR /&gt;16 ! for PKAnalysis\Project 3- Interating Data for&lt;BR /&gt;16 ! PKAnalysis\Work\04utility';&lt;BR /&gt;NOTE: Libref SASFILE was successfully assigned as follows:&lt;BR /&gt;Engine: V9&lt;BR /&gt;Physical Name: D:\SAS\Project\Project 3- Interating Data&lt;BR /&gt;for PKAnalysis\Project 3- Interating Data for&lt;BR /&gt;PKAnalysis\Work\04utility&lt;BR /&gt;17 proc copy inlib=xptfile outlib=sasfile;&lt;BR /&gt;18 options nofmterr;&lt;BR /&gt;19 run;&lt;/P&gt;&lt;P&gt;NOTE: Input library XPTFILE is sequential.&lt;BR /&gt;NOTE: Copying XPTFILE.FORMATS to SASFILE.FORMATS (memtype=DATA).&lt;BR /&gt;NOTE: BUFSIZE is not cloned when copying across different&lt;BR /&gt;engines. System Option for BUFSIZE was used.&lt;BR /&gt;NOTE: There were 500 observations read from the data set&lt;BR /&gt;XPTFILE.FORMATS.&lt;BR /&gt;NOTE: The data set SASFILE.FORMATS has 500 observations and 21&lt;BR /&gt;variables.&lt;BR /&gt;NOTE: PROCEDURE COPY used (Total process time):&lt;BR /&gt;real time 0.25 seconds&lt;BR /&gt;cpu time 0.04 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;20 libname form 'D:\SAS\Project\Project 3- Interating Data for&lt;BR /&gt;20 ! PKAnalysis\Project 3- Interating Data for&lt;BR /&gt;20 ! PKAnalysis\Work\04utility';&lt;BR /&gt;NOTE: Libref FORM refers to the same physical library as&lt;BR /&gt;SASFILE.&lt;BR /&gt;NOTE: Libref FORM was successfully assigned as follows:&lt;BR /&gt;Engine: V9&lt;BR /&gt;Physical Name: D:\SAS\Project\Project 3- Interating Data&lt;BR /&gt;for PKAnalysis\Project 3- Interating Data for&lt;BR /&gt;PKAnalysis\Work\04utility&lt;BR /&gt;21 proc format cntlin=sasfile.formats;&lt;BR /&gt;NOTE: Format BTPU11_ has been output.&lt;BR /&gt;NOTE: Format CHIP11_ has been output.&lt;BR /&gt;NOTE: Format CRN11_ has been output.&lt;BR /&gt;NOTE: Format DART11_ has been output.&lt;BR /&gt;NOTE: Format DOSR11_ has been output.&lt;BR /&gt;NOTE: Format ETH11_ has been output.&lt;BR /&gt;NOTE: Format HGTU11_ has been output.&lt;BR /&gt;NOTE: Format RCE51_ has been output.&lt;BR /&gt;NOTE: Format RSND21_ has been output.&lt;BR /&gt;NOTE: Format SEX11_ has been output.&lt;BR /&gt;NOTE: Format VOLU11_ has been output.&lt;BR /&gt;NOTE: Format WGTU11_ has been output.&lt;BR /&gt;NOTE: Format YNO11_ has been output.&lt;BR /&gt;22 run;&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE FORMAT used (Total process time):&lt;BR /&gt;real time 0.29 seconds&lt;BR /&gt;cpu time 0.15 seconds&lt;/P&gt;&lt;P&gt;NOTE: There were 500 observations read from the data set&lt;BR /&gt;SASFILE.FORMATS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;36 data PKDMG;&lt;BR /&gt;37 merge bapk (in=a) DMG (in=b);&lt;BR /&gt;38 format country sex DOB1D race;&lt;BR /&gt;39 keep country sex DOB1D race;&lt;BR /&gt;40 options nofmterr;&lt;BR /&gt;41 run;&lt;/P&gt;&lt;P&gt;NOTE: Variable country is uninitialized.&lt;BR /&gt;NOTE: Variable sex is uninitialized.&lt;BR /&gt;NOTE: Variable race is uninitialized.&lt;BR /&gt;WARNING: The variable country in the DROP, KEEP, or RENAME list&lt;BR /&gt;has never been referenced.&lt;BR /&gt;WARNING: The variable sex in the DROP, KEEP, or RENAME list has&lt;BR /&gt;never been referenced.&lt;BR /&gt;WARNING: The variable race in the DROP, KEEP, or RENAME list&lt;BR /&gt;has never been referenced.&lt;BR /&gt;NOTE: There were 300 observations read from the data set&lt;BR /&gt;WORK.BAPK.&lt;BR /&gt;NOTE: There were 25 observations read from the data set&lt;BR /&gt;WORK.DMG.&lt;BR /&gt;NOTE: The data set WORK.PKDMG has 300 observations and 1&lt;BR /&gt;variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.10 seconds&lt;BR /&gt;cpu time 0.09 seconds&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 16:35:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Accessing-the-sas-file-converted-from-xpt/m-p/798070#M313783</guid>
      <dc:creator>Tejaswini3</dc:creator>
      <dc:date>2022-02-23T16:35:34Z</dc:date>
    </item>
  </channel>
</rss>

