<?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: why cannot find those formats? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/why-cannot-find-those-formats/m-p/771461#M244820</link>
    <description>&lt;P&gt;Then look for another piece of code from your teacher that includes the PROC FORMAT statement(s) to define the formats and run that first so that the formats exist before you create the dataset that is trying to reference them.&lt;/P&gt;</description>
    <pubDate>Thu, 30 Sep 2021 18:49:04 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2021-09-30T18:49:04Z</dc:date>
    <item>
      <title>why cannot find those formats?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-cannot-find-those-formats/m-p/771435#M244812</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;LIBNAME PUF "C:\SAS data and program\data\data for project in SAS class";
OPTIONS FMTSEARCH = (PUF WORK SASUSER);

%LET MYPATH = C:\SAS data and program\data\data for project in SAS class;
DATA MYPROJECT;
SET PUF.NISTEENPUF18(KEEP = SEQNUMT PDAT2 PROVWT_C STRATUM YEAR AGE SEX RACEETHK EDUC1 AGEGRP_M_I MARITAL2 INCPORAR_I INS_STAT2_I CKUP_11_12 CEN_REG FACILITY STATE P_UTDHPV P_UTDHPV2 P_UTDHPV_15INT P_UTDMEN P_UTDMENACWY P_UTDTD P_UTDTDAP P_UTDTDAP7);

/*** ASSIGNING NEW AGE OF TEEN VARIABLE:  1 = 13 YEARS, 2 = 14 YEARS, 3 = 15 YEARS, 4 = 16 YEARS, AND 5 = 17 YEARS ***/
	NEWAGE = .;
	IF AGE IN (13) THEN NEWAGE = 1;
	ELSE IF AGE IN (14) THEN NEWAGE = 2;
	ELSE IF AGE IN (15) THEN NEWAGE = 3;
	ELSE IF AGE IN (16) THEN NEWAGE = 4;
	ELSE IF AGE IN (17) THEN NEWAGE = 5;

/*	NEWAGE2 = AGE - 12;*/

/*** ASSIGNING AGE GROUP OF TEEN VARIABLE:  1 = (13 - 15)YEARS; 2 = (16-17) YEARS. ***/
	TEENAGEGP = .;
	IF AGE IN (13, 14, 15) THEN TEENAGEGP = 1;
	ELSE IF AGE IN (16, 17) THEN TEENAGEGP = 2;

/*** REGROUPING 11-12 YEAR OLD WELL-CHILD EXAM OR CHECK-UP OF TEEN: BY COMBINING DON'T KNOW /REFUSED / MISSING AS 3 ***/
	MYCKUP1112 = CKUP_11_12;
	IF  CKUP_11_12 IN (., 77, 99) THEN MYCKUP1112 = 3;

/*** ASSIGNING MISSING FACILITY AS UNKNOW = 6 ***/
	MYFACILITY = FACILITY;
	IF  FACILITY IN (.) THEN MYFACILITY = 6;

/*** INCOME TO POVERTY RATIO VARIABLE 1= &amp;lt;133%; 2=133% TO 322% ***/
	IF 0 &amp;lt;= INCPORAR_I &amp;lt; 1.33162 THEN MYINCTOPOV = 1;
	ELSE IF 1.33162 &amp;lt;= INCPORAR_I &amp;lt; 3.22046 THEN MYINCTOPOV = 2;

/*** REASSIGNING RACE/ETHNICITY VARIABLES: 1 = NH-WHITES; 2 = NH-BLACKS; 3 = HISPANICS; 4 = NH-OTHERS ***/
	MYRACEETH = .;
	IF RACEETHK = 1 THEN MYRACEETH = 3;
	ELSE IF RACEETHK = 2 THEN MYRACEETH = 1;
	ELSE IF RACEETHK = 3 THEN MYRACEETH = 2;
	ELSE IF RACEETHK = 4 THEN MYRACEETH = 4;

RUN;

/***************************************************************************/
/*** THIS PROGRAM PRODUCES ALL MY VARIABLE CREATED IN THE SUBSET DATA  ***/
/***************************************************************************/

PROC CONTENTS DATA = MYPROJECT VARNUM;
RUN;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;log&amp;nbsp;:&lt;BR /&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;50 LIBNAME PUF "C:\SAS data and program\data\data for project in SAS class";&lt;BR /&gt;NOTE: Libref PUF was successfully assigned as follows:&lt;BR /&gt;Engine: V9&lt;BR /&gt;Physical Name: C:\SAS data and program\data\data for project in SAS class&lt;BR /&gt;51 OPTIONS FMTSEARCH = (PUF WORK SASUSER);&lt;BR /&gt;52&lt;BR /&gt;53 %LET MYPATH = C:\SAS data and program\data\data for project in SAS class;&lt;BR /&gt;54 DATA MYPROJECT;&lt;BR /&gt;55 SET PUF.NISTEENPUF18(KEEP = SEQNUMT PDAT2 PROVWT_C STRATUM YEAR AGE SEX RACEETHK EDUC1 AGEGRP_M_I&lt;BR /&gt;55 ! MARITAL2 INCPORAR_I INS_STAT2_I CKUP_11_12 CEN_REG FACILITY STATE P_UTDHPV P_UTDHPV2&lt;BR /&gt;55 ! P_UTDHPV_15INT P_UTDMEN P_UTDMENACWY P_UTDTD P_UTDTDAP P_UTDTDAP7);&lt;BR /&gt;56&lt;BR /&gt;57 /*** ASSIGNING NEW AGE OF TEEN VARIABLE: 1 = 13 YEARS, 2 = 14 YEARS, 3 = 15 YEARS, 4 = 16 YEARS,&lt;BR /&gt;57 ! AND 5 = 17 YEARS ***/&lt;BR /&gt;58 NEWAGE = .;&lt;BR /&gt;59 IF AGE IN (13) THEN NEWAGE = 1;&lt;BR /&gt;60 ELSE IF AGE IN (14) THEN NEWAGE = 2;&lt;BR /&gt;61 ELSE IF AGE IN (15) THEN NEWAGE = 3;&lt;BR /&gt;62 ELSE IF AGE IN (16) THEN NEWAGE = 4;&lt;BR /&gt;63 ELSE IF AGE IN (17) THEN NEWAGE = 5;&lt;BR /&gt;64&lt;BR /&gt;65 /* NEWAGE2 = AGE - 12;*/&lt;BR /&gt;66&lt;BR /&gt;67 /*** ASSIGNING AGE GROUP OF TEEN VARIABLE: 1 = (13 - 15)YEARS; 2 = (16-17) YEARS. ***/&lt;BR /&gt;68 TEENAGEGP = .;&lt;BR /&gt;69 IF AGE IN (13, 14, 15) THEN TEENAGEGP = 1;&lt;BR /&gt;70 ELSE IF AGE IN (16, 17) THEN TEENAGEGP = 2;&lt;BR /&gt;71&lt;BR /&gt;72 /*** REGROUPING 11-12 YEAR OLD WELL-CHILD EXAM OR CHECK-UP OF TEEN: BY COMBINING DON'T KNOW&lt;BR /&gt;72 ! /REFUSED / MISSING AS 3 ***/&lt;BR /&gt;73 MYCKUP1112 = CKUP_11_12;&lt;BR /&gt;74 IF CKUP_11_12 IN (., 77, 99) THEN MYCKUP1112 = 3;&lt;BR /&gt;75&lt;BR /&gt;76 /*** ASSIGNING MISSING FACILITY AS UNKNOW = 6 ***/&lt;BR /&gt;77 MYFACILITY = FACILITY;&lt;BR /&gt;78 IF FACILITY IN (.) THEN MYFACILITY = 6;&lt;BR /&gt;79&lt;BR /&gt;80 /*** INCOME TO POVERTY RATIO VARIABLE 1= &amp;lt;133%; 2=133% TO 322% ***/&lt;BR /&gt;81 IF 0 &amp;lt;= INCPORAR_I &amp;lt; 1.33162 THEN MYINCTOPOV = 1;&lt;BR /&gt;82 ELSE IF 1.33162 &amp;lt;= INCPORAR_I &amp;lt; 3.22046 THEN MYINCTOPOV = 2;&lt;BR /&gt;83&lt;BR /&gt;84 /*** REASSIGNING RACE/ETHNICITY VARIABLES: 1 = NH-WHITES; 2 = NH-BLACKS; 3 = HISPANICS; 4 =&lt;BR /&gt;84 ! NH-OTHERS ***/&lt;BR /&gt;85 MYRACEETH = .;&lt;BR /&gt;86 IF RACEETHK = 1 THEN MYRACEETH = 3;&lt;BR /&gt;87 ELSE IF RACEETHK = 2 THEN MYRACEETH = 1;&lt;BR /&gt;88 ELSE IF RACEETHK = 3 THEN MYRACEETH = 2;&lt;BR /&gt;89 ELSE IF RACEETHK = 4 THEN MYRACEETH = 4;&lt;BR /&gt;90&lt;BR /&gt;91 RUN;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;ERROR: The format $CHARGEN was not found or could not be loaded.&lt;BR /&gt;ERROR: The format ADEQ was not found or could not be loaded.&lt;BR /&gt;ERROR: The format NUMGEN was not found or could not be loaded.&lt;BR /&gt;ERROR: The format NUMGEN was not found or could not be loaded.&lt;BR /&gt;ERROR: The format NUMGEN was not found or could not be loaded.&lt;BR /&gt;ERROR: The format YNDKRF was not found or could not be loaded.&lt;BR /&gt;ERROR: The format NUMDKRF was not found or could not be loaded.&lt;BR /&gt;ERROR: The format AGEGRP_M was not found or could not be loaded.&lt;BR /&gt;ERROR: The format CENREG was not found or could not be loaded.&lt;BR /&gt;ERROR: The format EDUC4_M was not found or could not be loaded.&lt;BR /&gt;ERROR: The format NUMGEN was not found or could not be loaded.&lt;BR /&gt;ERROR: The format MAR_PUF2_ was not found or could not be loaded.&lt;BR /&gt;ERROR: The format RACEETHK was not found or could not be loaded.&lt;BR /&gt;ERROR: The format SEX was not found or could not be loaded.&lt;BR /&gt;ERROR: The format STATE was not found or could not be loaded.&lt;BR /&gt;ERROR: The format FACILSUM was not found or could not be loaded.&lt;BR /&gt;ERROR: The format UTD was not found or could not be loaded.&lt;BR /&gt;ERROR: The format UTD was not found or could not be loaded.&lt;BR /&gt;ERROR: The format UTD was not found or could not be loaded.&lt;BR /&gt;ERROR: The format UTD was not found or could not be loaded.&lt;BR /&gt;ERROR: The format UTD was not found or could not be loaded.&lt;BR /&gt;ERROR: The format UTD was not found or could not be loaded.&lt;BR /&gt;ERROR: The format UTD was not found or could not be loaded.&lt;BR /&gt;ERROR: The format UTD was not found or could not be loaded.&lt;BR /&gt;ERROR: The format INS_STAT2_I was not found or could not be loaded.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.MYPROJECT may be incomplete. When this step was stopped there were 0&lt;BR /&gt;observations and 31 variables.&lt;BR /&gt;WARNING: Data set WORK.MYPROJECT was not replaced because this step was stopped.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.17 seconds&lt;BR /&gt;cpu time 0.17 seconds&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;92&lt;BR /&gt;93 /***************************************************************************/&lt;BR /&gt;94 /*** THIS PROGRAM PRODUCES ALL MY VARIABLE CREATED IN THE SUBSET DATA ***/&lt;BR /&gt;95 /***************************************************************************/&lt;BR /&gt;96&lt;BR /&gt;97 PROC CONTENTS DATA = MYPROJECT VARNUM;&lt;BR /&gt;98 RUN;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;NOTE: PROCEDURE CONTENTS used (Total process time):&lt;BR /&gt;real time 0.04 seconds&lt;BR /&gt;cpu time 0.04 seconds&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;please tell me what's&amp;nbsp; wrong with the code ? thanks&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Sep 2021 17:43:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-cannot-find-those-formats/m-p/771435#M244812</guid>
      <dc:creator>tianerhu</dc:creator>
      <dc:date>2021-09-30T17:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: why cannot find those formats?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-cannot-find-those-formats/m-p/771436#M244813</link>
      <description>&lt;P&gt;These are custom formats. You need to have the code for these formats prior to the usage of the format in the program, or in a FMTLIB that your program accesses. You can turn off the error messages with&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options nofmterr;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;but then of course you can't use the custom formats and things may not run as expected. Whoever created these data sets knows where the custom formats are located and can provide you with instructions on how to use them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/268447"&gt;@tianerhu&lt;/a&gt;&amp;nbsp;you have been in this forum long enough to know that LOG must be in a "Insert Code" box accessed by clicking on the &amp;lt;/&amp;gt; icon. Please don't provide us with unformatted log any more.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Sep 2021 17:51:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-cannot-find-those-formats/m-p/771436#M244813</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-09-30T17:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: why cannot find those formats?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-cannot-find-those-formats/m-p/771437#M244814</link>
      <description>&lt;P&gt;So you told SAS to look for formats in the catalog PUF.FORMATS.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;OPTIONS FMTSEARCH = (PUF WORK SASUSER);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Does that catalog exist?&amp;nbsp; What does it have in it?&amp;nbsp; Ask PROC FORMAT to show you.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format lib=puf.formats noprint out=formats; run;
proc freq data=formats;
  tables fmtname;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Sep 2021 17:54:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-cannot-find-those-formats/m-p/771437#M244814</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-09-30T17:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: why cannot find those formats?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-cannot-find-those-formats/m-p/771441#M244817</link>
      <description>Thank you for your help . &lt;BR /&gt;Sorry about that .&lt;BR /&gt;I will do what you say next time.</description>
      <pubDate>Thu, 30 Sep 2021 18:04:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-cannot-find-those-formats/m-p/771441#M244817</guid>
      <dc:creator>tianerhu</dc:creator>
      <dc:date>2021-09-30T18:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: why cannot find those formats?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-cannot-find-those-formats/m-p/771442#M244818</link>
      <description>&lt;PRE&gt;99   proc format lib=puf.formats noprint out=formats;
99 !                                                  run;

NOTE: PROCEDURE FORMAT used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds

ERROR: Catalog PUF.FORMATS does not exist.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.FORMATS may be incomplete.  When this step was stopped there were 0
         observations and 0 variables.


100  proc freq data=formats;
101    tables fmtname;
ERROR: Variable FMTNAME not found.
102  run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE FREQ used (Total process time):
      real time           0.11 seconds
      cpu time            0.03 second
&lt;/PRE&gt;
&lt;P&gt;yes , the pub.format is not exist . actually , this code is provided by my teacher teching SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Sep 2021 18:07:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-cannot-find-those-formats/m-p/771442#M244818</guid>
      <dc:creator>tianerhu</dc:creator>
      <dc:date>2021-09-30T18:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: why cannot find those formats?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-cannot-find-those-formats/m-p/771461#M244820</link>
      <description>&lt;P&gt;Then look for another piece of code from your teacher that includes the PROC FORMAT statement(s) to define the formats and run that first so that the formats exist before you create the dataset that is trying to reference them.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Sep 2021 18:49:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-cannot-find-those-formats/m-p/771461#M244820</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-09-30T18:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: why cannot find those formats?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-cannot-find-those-formats/m-p/771468#M244824</link>
      <description>&lt;P&gt;if i cannot find the format file , what should I do ?&lt;/P&gt;</description>
      <pubDate>Thu, 30 Sep 2021 19:10:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-cannot-find-those-formats/m-p/771468#M244824</guid>
      <dc:creator>tianerhu</dc:creator>
      <dc:date>2021-09-30T19:10:35Z</dc:date>
    </item>
    <item>
      <title>Re: why cannot find those formats?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/why-cannot-find-those-formats/m-p/771470#M244825</link>
      <description>&lt;P&gt;Add this line to the top of your program.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options nofmterr;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;That will convert the ERROR messages into note/warnings so that you can actually create the dataset and work with it.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Sep 2021 19:15:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/why-cannot-find-those-formats/m-p/771470#M244825</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-09-30T19:15:11Z</dc:date>
    </item>
  </channel>
</rss>

