<?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: Field type isn't staying the same between datasteps in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Field-type-isn-t-staying-the-same-between-datasteps/m-p/744071#M233049</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BJM_0-1622076095605.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/59797i988BF6DAFC3F90AC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BJM_0-1622076095605.png" alt="BJM_0-1622076095605.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The original field Mom_Middle_R exists in the Registry dataset and when I attempt to merge with another file, it insists the field is numeric.&lt;/P&gt;</description>
    <pubDate>Thu, 27 May 2021 00:42:49 GMT</pubDate>
    <dc:creator>BJM</dc:creator>
    <dc:date>2021-05-27T00:42:49Z</dc:date>
    <item>
      <title>Field type isn't staying the same between datasteps</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Field-type-isn-t-staying-the-same-between-datasteps/m-p/744059#M233044</link>
      <description>&lt;P&gt;In my registry data, the field is character - Mom_Middle_R, format of $50.&lt;/P&gt;
&lt;P&gt;When I go to combine the&amp;nbsp;registry file with a births file, I keep getting messages that&amp;nbsp;Mom_Middle_R is a numeric field and that the value of LEEANN is invalid. the field is just being carried over to the combined file, no modifications are being made to it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data Local.Full_Registry ;&amp;nbsp;&lt;BR /&gt;Attrib&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;Mom_Middle_R Format=$50.&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;I tested enclosing the value as |LEEANNA| and that got the same error message, too.&lt;/P&gt;
&lt;P&gt;NOTE: Invalid numeric data, '|LEEANNA|' , at line 6565 column 15.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tested putting the value in a holding field Hold_Mom_Middle_R, then&amp;nbsp; creating&amp;nbsp;&amp;nbsp;Mom_Middle_R after merging my files.&lt;/P&gt;
&lt;P&gt;Same issue.&lt;/P&gt;
&lt;P&gt;Thoughts? What things can I check next?&lt;/P&gt;
&lt;P&gt;I tried using a Length assignment, too.&lt;/P&gt;
&lt;P&gt;6650 Length Mom_Middle_R $ 50;&lt;BR /&gt;ERROR: Character length cannot be used with numeric variable Mom_Middle_R.&lt;BR /&gt;6651 Mom_Middle_R =Put(Hold_Mom_Middle_R,$50.);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 22:25:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Field-type-isn-t-staying-the-same-between-datasteps/m-p/744059#M233044</guid>
      <dc:creator>BJM</dc:creator>
      <dc:date>2021-05-26T22:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: Field type isn't staying the same between datasteps</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Field-type-isn-t-staying-the-same-between-datasteps/m-p/744062#M233046</link>
      <description>Show your whole code. I suspect how you're trying to change variable types is not valid in SAS - you need to use explicit INPUT/PUT functions you cannot change the types in a data set or by changing attributes on the variable, you need to create new variables with the right type. You can rename them to the old name though after.</description>
      <pubDate>Wed, 26 May 2021 22:33:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Field-type-isn-t-staying-the-same-between-datasteps/m-p/744062#M233046</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-05-26T22:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: Field type isn't staying the same between datasteps</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Field-type-isn-t-staying-the-same-between-datasteps/m-p/744064#M233047</link>
      <description>&lt;P&gt;Reading in and cleaning the registry dataset (archive file with very messy data!)&lt;/P&gt;
&lt;P&gt;Data Local.Full_Registry ; /* re-order,rename, and upcase fields*/&lt;BR /&gt;Attrib&lt;BR /&gt;Registry_ID Format=5.&lt;BR /&gt;CertKey_B Format=$12. Label="Birth Certificate Key"&lt;BR /&gt;Year Format=4.&lt;BR /&gt;BState Format=$2.&lt;BR /&gt;Sex_R Format=$1.&lt;BR /&gt;Kid_Full_R Format=$200. Label=""&lt;BR /&gt;Kid_First_R Format=$50. Label=""&lt;BR /&gt;Kid_Middle_R Format=$50. Label=""&lt;BR /&gt;Kid_First_Middle_R Format=$100.&lt;BR /&gt;Kid_Last_R Format=$50. Label=""&lt;BR /&gt;Kid_Suffix_R Format=$10. Label=""&lt;BR /&gt;Mom_Full_R Format=$200. Label=""&lt;BR /&gt;Mom_First_R Format=$50. Label=""&lt;BR /&gt;Mom_Middle_R Format=$50. Label=""&lt;BR /&gt;Mom_First_Middle_R Format=$100.&lt;BR /&gt;Mom_Last_R Format=$50. Label=""&lt;BR /&gt;Mom_Maiden_R Format=$50. Label=""&lt;BR /&gt;DoB_Num_R Format=10. Label="Numeric Kid DoB YYYYMMDD"&lt;BR /&gt;MDoB_Num_R Format=10. Label="Numeric Mom DoB YYYYMMDD"&lt;BR /&gt;DoB_R Format=YYMMDD10. Label="Kid DoB YYYYMMDD"&lt;BR /&gt;;&lt;BR /&gt;Set Local.Registry_Backup&lt;BR /&gt;(Rename=(&lt;BR /&gt;CertKey = CertKey_B&lt;BR /&gt;FirstName = Kid_First_R&lt;BR /&gt;MiddleName = Kid_Middle_R&lt;BR /&gt;LastName = Kid_Last_R&lt;BR /&gt;ChildsSuffix = Kid_Suffix_R&lt;BR /&gt;MotherFirstName = Mom_First_R&lt;BR /&gt;MotherMiddleName = Mom_Middle_R&lt;BR /&gt;MotherLastName = Mom_Last_R&lt;BR /&gt;MotherMaidenName = Mom_Maiden_R /*&lt;BR /&gt;Sex = Sex_R*/&lt;BR /&gt;DateOfBirth = DoB_R&lt;BR /&gt;MotherDateofBirth = MDoB_R&lt;BR /&gt;));&lt;BR /&gt;Registry_ID = _N_;&lt;BR /&gt;IDoB_Yr_R = Year;&lt;BR /&gt;If Gender = 1 Then Sex_R = Put("M",$1.); Else&lt;BR /&gt;If Gender = 2 Then Sex_R = Put("F",$1.); Else&lt;BR /&gt;Sex_R = Put("U",$1.);&lt;/P&gt;
&lt;P&gt;Kid_Suffix_R = Put(Compress(Kid_Suffix_R),$10.);&lt;BR /&gt;BState = Substr(CertKey_B,5,2);&lt;/P&gt;
&lt;P&gt;If Mom_First_R In (&lt;BR /&gt;"24838", "26248", "26881", "27549", "27760", "27920", &lt;BR /&gt;"28048", "28508", "28671", "28762", "28917", "29053", &lt;BR /&gt;"29293", "29501", "29560", "29859", "29974", "30157",&lt;BR /&gt;"30822", "30982", "31723", "31775", "32097", "32165",&lt;BR /&gt;"32537", "33939", "34027", "34048", "34118", "34344",&lt;BR /&gt;"34347")&lt;BR /&gt;And Missing(MDoB_R)=1&lt;BR /&gt;Then Do; &lt;BR /&gt;If Mom_First_R = Mom_Last_R Then Mom_Last_R="";&lt;BR /&gt;MDoB = 1 * Mom_First_R;&lt;BR /&gt;Mom_First_R = "";&lt;BR /&gt;End;&lt;BR /&gt;If Mom_First_R In (&lt;BR /&gt;"19720117", "19780911", "19790628", "19791207", "19820310", &lt;BR /&gt;"19850410", "19861006", "19880113", "19921005", "19960807", &lt;BR /&gt;"20110309", "20110413", "20110601", "20110607", "20110608", &lt;BR /&gt;"20110614", "20110622", "20110708", "20110804", "20110822", &lt;BR /&gt;"20110912", "20110914", "20110917", "20111220", "20111230", &lt;BR /&gt;"20120104", "20120116", "20120119", "20120202", "20120208", &lt;BR /&gt;"20120213", "20120309", "20120319", "20120314", "20120319", &lt;BR /&gt;"20120408", "20120411", "20120412", "20120525", "20120610", &lt;BR /&gt;"20120613", "20120625", "20120711", "20120724", "20120803", &lt;BR /&gt;"20120814", "20120822", "20120823", "20120903", "20120913", &lt;BR /&gt;"20120923", "20121108", "20121205", "20130104", "20130308", &lt;BR /&gt;"20130327", "20130606", "20130608", "20130611", "20130617", &lt;BR /&gt;"20130710", "20131016", "20131119", "20140101", "20140108",&lt;BR /&gt;"20140124", "20140224", "20140307", "20140320", "20140409",&lt;BR /&gt;"20140421", "20140430", "20140512", "20140514", "20140530", &lt;BR /&gt;"20140611", "20140613", "20140620", "20140808", "20140811", &lt;BR /&gt;"20140813", "20140910", "20140923", "20141116", "20141206",&lt;BR /&gt;"20141208", "20141216", "20150114", "20150130", "20150211",&lt;BR /&gt;"20150221", "20150310", "20150311", "20150321", "201203119") &lt;BR /&gt;And Missing(MDoB)=1&lt;BR /&gt;Then Do;&lt;BR /&gt;If Mom_First_R = Mom_Last_R Then Mom_Last_R="";&lt;BR /&gt;MDoB_Yr = Substr(Mom_First_R,1,4)*1;&lt;BR /&gt;MDoB_Mo = Substr(Mom_First_R,5,2)*1;&lt;BR /&gt;MDoB_Dy = Substr(Mom_First_R,7,2)*1;&lt;BR /&gt;Call Missing(Mom_First_R);&lt;BR /&gt;Call Missing(Mom_Last_R);&lt;BR /&gt;Call Missing(Mom_Maiden_R);;&lt;BR /&gt;End;&lt;BR /&gt;If Mom_Last_R In ("NEITHER NEWBORN","1ST BORN","0","1","#N/A","-")&lt;BR /&gt;Then Call Missing(Mom_Last_R);&lt;BR /&gt;If Mom_Last_R EQ ".COACHMAN" Then Mom_Last_R = "COACHMAN";&lt;/P&gt;
&lt;P&gt;* MotherDate of Birth is as YYYYMMDD;&lt;/P&gt;
&lt;P&gt;If Missing(MDoB_R)=0 Then &lt;BR /&gt;MDoB_Num_R =((100*Year (MDoB_R)) + Month(MDoB_R))*100 + Day (MDoB_R);&lt;BR /&gt;Drop MDoB_Yr MDoB_Mo MDoB_Dy;&lt;/P&gt;
&lt;P&gt;* Infant Date of Birth - for matching; &lt;BR /&gt;DoB_Num_R =((100*Year (DoB_R)) + Month(DoB_R))*100 + Day (DoB_R);&lt;/P&gt;
&lt;P&gt;If Substr(Kid_Last_R,1,9) EQ "HUPPERICH"&lt;BR /&gt;Then Do;&lt;BR /&gt;Kid_Last_R = "HUPPERICH";&lt;BR /&gt;Kid_Suffix_R = "JR";&lt;BR /&gt;End;&lt;/P&gt;
&lt;P&gt;If Mom_Last_R eq "(PRICE)CAPEN" Then Mom_Last_R = "PRICE-CAPEN";&lt;BR /&gt;If Mom_Last_R eq "(YAHIAOUI) FOTHERINGHAM" Then Mom_Last_R = "YAHIAOUI-FOTHERINGHAM";&lt;BR /&gt;If Substr(Mom_Maiden_R,1,1)&lt;BR /&gt;In ("#","0","1","2","3","4","5","6","7","8","9") Then Mom_Maiden_R = "";&lt;/P&gt;
&lt;P&gt;If Trimn(Kid_Middle_R) EQ "BOYASHLEY" Then Kid_Middle_R = "" ;&lt;/P&gt;
&lt;P&gt;If Index (Kid_First_R,"#3" ) &amp;gt;0 &lt;BR /&gt;Then Kid_First_R= Substr(Kid_First_R,1,Index (Kid_First_R,"#3")-1);&lt;/P&gt;
&lt;P&gt;If Index (Kid_First_R,"(NONE)") &amp;gt;0 Or&lt;BR /&gt;Index (Kid_First_R,"BG" ) &amp;gt;0 Or &lt;BR /&gt;Index (Kid_First_R,"BB" ) &amp;gt;0 Or &lt;BR /&gt;Index (Kid_First_R,"BABY" ) &amp;gt;0 Or&lt;BR /&gt;Index (Kid_First_R,"BOY" ) &amp;gt;0 Or&lt;BR /&gt;Index (Kid_First_R,"GIRL" ) &amp;gt;0 Or&lt;BR /&gt;Index (Kid_First_R,"INFANT") &amp;gt;0 Or&lt;BR /&gt;Index (Kid_First_R,"TWIN" ) &amp;gt;0 Or&lt;BR /&gt;Index (Kid_First_R,"UNAMED") &amp;gt;0 Or&lt;BR /&gt;Index (Kid_First_R,"1" ) &amp;gt;0 &lt;BR /&gt;Then Do;&lt;BR /&gt;Call Missing(Kid_First_R );&lt;BR /&gt;Call Missing(Kid_Middle_R );&lt;BR /&gt;End;&lt;/P&gt;
&lt;P&gt;If Substr(Kid_Middle_R,1,1) eq "0" Or&lt;BR /&gt;Substr(Kid_Middle_R,1,1) eq "1" Or&lt;BR /&gt;Substr(Kid_Middle_R,1,1) eq "2" Or&lt;BR /&gt;Substr(Kid_Middle_R,1,1) eq "?" Or&lt;BR /&gt;Substr(Kid_Middle_R,1,2) eq "BG" Or &lt;BR /&gt;Substr(Kid_Middle_R,1,2) eq "BB" Or&lt;BR /&gt;Substr(Kid_Middle_R,1,3) eq "BOY " Or&lt;BR /&gt;Substr(Kid_Middle_R,1,4) eq "BABY" Or&lt;BR /&gt;Substr(Kid_Middle_R,1,4) eq "GIRL" Or&lt;BR /&gt;Substr(Kid_Middle_R,1,6) eq "INFANT" &lt;BR /&gt;Then Do;&lt;BR /&gt;Call Missing(Kid_First_R );&lt;BR /&gt;Call Missing(Kid_Middle_R );&lt;BR /&gt;End;&lt;/P&gt;
&lt;P&gt;If Index(Kid_First_R,"TWIN")&amp;gt;0 Then Call Missing(Kid_First_R);&lt;/P&gt;
&lt;P&gt;If Strip(Kid_Last_R) eq "1" Then Call Missing(Kid_Last_R);&lt;BR /&gt;If Index(Kid_Last_R,"III")&amp;gt;0 Then Do;&lt;BR /&gt;Kid_Suffix_R = Put("III",$3.);&lt;BR /&gt;Kid_Last_R = Tranwrd(Kid_Last_R,"","III");&lt;BR /&gt;End; Else&lt;BR /&gt;If Index(Kid_Last_R," JR")&amp;gt;0 Then Do;&lt;BR /&gt;Kid_Suffix_R = Put("JR",$2.);&lt;BR /&gt;Kid_Last_R = Tranwrd(Kid_Last_R,"","JR");&lt;BR /&gt;End; Else&lt;BR /&gt;If Index(Kid_Last_R," II")&amp;gt;0 Then Do;&lt;BR /&gt;Kid_Suffix_R = Put("II",$2.);&lt;BR /&gt;Kid_Last_R = Tranwrd(Kid_Last_R,"","II");;&lt;BR /&gt;End; &lt;BR /&gt;Array Fix_Names (6)&lt;BR /&gt;Kid_First_R Kid_Middle_R Kid_Last_R &lt;BR /&gt;Mom_First_R Mom_Middle_R Mom_Maiden_R;&lt;BR /&gt;Do i = 1 To 6;&lt;BR /&gt;If Fix_Names (I) In ("UNKNOWN","UNATAINABLE","UNKOWN") &lt;BR /&gt;Then Fix_Names(I) = "";&lt;BR /&gt;If Index(Fix_Names (I),".")&amp;gt;0 &lt;BR /&gt;Then Fix_Names (I) = "";&lt;BR /&gt;End; Drop I;&lt;BR /&gt;If Mom_Maiden_R EQ "ONLY" Then Call Missing(Mom_Maiden_R);&lt;BR /&gt;If Trimn(Mom_First_R) In ("#N/A" ,"0","1") Then Call Missing(Mom_First_R );&lt;BR /&gt;If Trimn(Mom_Last_R ) In ("***LOOK UP MOM","1") Then Call Missing(Mom_Last_R );&lt;/P&gt;
&lt;P&gt;Kid_First_R = Trimn(Compress(Upcase(Kid_First_R ),",?",));&lt;BR /&gt;Kid_Middle_R = Trimn(Compress(Upcase(Kid_Middle_R),",?",));&lt;BR /&gt;Kid_Last_R = Trimn(Compress(Upcase(Kid_Last_R ),",?",));&lt;BR /&gt;Kid_Suffix_R = Trimn(Compress(Upcase(Kid_Suffix_R),",?",));&lt;/P&gt;
&lt;P&gt;Mom_First_R = Trimn(Compress(Upcase(Mom_First_R ),",?",));&lt;BR /&gt;Mom_Middle_R = Trimn(Compress(Upcase(Mom_Middle_R),",?",));&lt;BR /&gt;Mom_Maiden_R = Trimn(Compress(Upcase(Mom_Maiden_R),",?",));&lt;BR /&gt;Mom_Last_R = Trimn(Compress(Upcase(Mom_Last_R ) ,",?",));&lt;/P&gt;
&lt;P&gt;Kid_First_Middle_R = Compbl(cat(Trimn(Kid_First_R)," ",Trimn(Kid_Middle_R) ) );&lt;BR /&gt;Mom_First_Middle_R = Compbl(cat(Trimn(Mom_First_R)," ",Trimn(Mom_Middle_R) ) );&lt;/P&gt;
&lt;P&gt;Kid_Full_R = Compbl(Cat(Trimn(Kid_First_R), " ", Trimn(Substr(Kid_Middle_R,1,1))," ", Trimn(Kid_Last_R)," ", Trimn(Kid_Suffix_R)));&lt;BR /&gt;Mom_Full_R = Compbl(Cat(Trimn(Mom_First_R), " ", Trimn(Substr(Mom_Middle_R,1,1))," ", Trimn(Mom_Last_R)," ", Trimn(Mom_Maiden_R)));&lt;BR /&gt;;&lt;BR /&gt;Run;&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;****************************************************************************;;&lt;BR /&gt;Proc Sort Data=Local.Full_Registry NodupKey; By CertKey_B ; Run;&lt;BR /&gt;Proc Sort Data=Local.Full_Births NodupKey; By CertKey_B ; Run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data Local.Full_Births_Registry Local.CertKey_B_Birth_ID_List (Keep=CertKey_B Birth_ID Registry_ID);&lt;BR /&gt;Attrib&lt;BR /&gt;Source Format=$23.&lt;BR /&gt;Registry_ID Format=9. Label = "Birth Defect Case ID"&lt;BR /&gt;Birth_ID Format=9. Label = "Birth File Case ID"&lt;BR /&gt;CertKey_B Format=$12. Label = "CertKey_B"&lt;BR /&gt;Sex_B Format=$1. Label = "Child's gender"&lt;BR /&gt;IDoB_Yr Format=4.&lt;BR /&gt;BMICategory Format=1. Label = "BMI Category"&lt;BR /&gt;Total_Order Format=2. Label = "Order for present Birth"&lt;BR /&gt;Pay Format=1. Label = "Principal Payor"&lt;BR /&gt;MEthnicE Format=$3.&lt;BR /&gt;IDoB_Yr Format=4. Label = "Child's Year of Birth"&lt;BR /&gt;OWGest Format=2. Label = "Obstetric estimate of gestation"&lt;BR /&gt;Gest_Comb Format=2. &lt;BR /&gt;Gest_Calc Format=2. Label = "Calculated estimate of gestation"&lt;BR /&gt;BWG Format=4. Label = "Birthweight in Grams"&lt;BR /&gt;Plur Format=2. Label = "Plurality"&lt;BR /&gt;Total_Order Format=2. Label = "Birth Order"&lt;BR /&gt;Kid_Full_B Format=$200.&lt;BR /&gt;Kid_Full_R Format=$200.&lt;BR /&gt;Kid_First_Middle_B Format=$200.&lt;BR /&gt;Kid_First_Middle_R Format=$100.&lt;BR /&gt;Kid_Last_B Format=$50.&lt;BR /&gt;Kid_Last_R Format=$50.&lt;BR /&gt;Kid_Last_Suffix_B Format=$200.&lt;BR /&gt;Kid_Suffix_B Format=$10.&lt;BR /&gt;Kid_Suffix_R Format=$10.&lt;BR /&gt;Mom_Full_B Format=$200.&lt;BR /&gt;Mom_Full_R Format=$200.&lt;BR /&gt;Mom_First_B Format=$50.&lt;BR /&gt;Mom_First_R Format=$50.&lt;BR /&gt;Mom_Middle_B Format=$50./*&lt;BR /&gt;Mom_Middle_R Format=$50.*/&lt;BR /&gt;Mom_First_Middle_B Format=$100.&lt;BR /&gt;Mom_First_Middle_R Format=$100.&lt;BR /&gt;Mom_Last_B Format=$50.&lt;BR /&gt;Mom_Last_R Format=$50.&lt;BR /&gt;Mom_Maiden_B Format=$50.&lt;BR /&gt;Mom_Maiden_R Format=$50.&lt;BR /&gt;Mom_MidInit_B Format=$1.&lt;BR /&gt;Mom_Suffix_B Format=$10.&lt;BR /&gt;Dad_First_B Format=$50.&lt;BR /&gt;Dad_Full_B Format=$200.&lt;BR /&gt;Dad_First_Middle_B Format=$200.&lt;BR /&gt;Dad_Middle_B Format=$50.&lt;BR /&gt;Dad_Last_B Format=$50.&lt;BR /&gt;Dad_Last_Suffix_B Format=$60.&lt;BR /&gt;Dad_Suffix_B Format=$10.&lt;BR /&gt;;&lt;BR /&gt;Merge &lt;BR /&gt;Local.Full_Births &lt;BR /&gt;(In=A )&lt;BR /&gt;Local.Full_registry &lt;BR /&gt;(In=B Keep= Registry_ID CertKey_B&lt;BR /&gt;Kid_Full_R Mom_Full_R&lt;BR /&gt;Kid_First_R Kid_First_Middle_R Kid_Middle_R Kid_Last_R Kid_Suffix_R &lt;BR /&gt;Mom_First_R Mom_First_Middle_R Mom_Middle_R Mom_Last_R Mom_Maiden_R &lt;BR /&gt;ICD_Code1 -- ICD_Code17&lt;BR /&gt;D_Descrip1 -- D_Descrip17&lt;BR /&gt;D_Status1 -- D_Status17 ) ;&lt;BR /&gt;By CertKey_B;&lt;BR /&gt;*If A;&lt;BR /&gt;If A And B Then Source = "Registry AND Births "; Else &lt;BR /&gt;If A And Not B Then Source = "Births without Registry"; Else &lt;BR /&gt;If Not A And B Then Source = "Registry without Births";&lt;/P&gt;
&lt;P&gt;*Mom_Middle_R =Put(Hold_Mom_Middle_R,$50.);&lt;/P&gt;
&lt;P&gt;If Missing(Kid_First_B )=1 And Missing(Kid_First_R )=0 Then Kid_First_B = Kid_First_R;&lt;BR /&gt;If Missing(Kid_Middle_B)=1 And Missing(Kid_Middle_R)=0 Then Kid_Middle_B = Kid_Middle_R;&lt;BR /&gt;If Missing(Kid_Last_B )=1 And Missing(Kid_Last_R )=0 Then Kid_Last_B = Kid_Last_R;&lt;BR /&gt;If Missing(Kid_Full_B )=1 And Missing(Kid_Full_R )=0 Then Kid_Full_B = Mom_Full_R;&lt;/P&gt;
&lt;P&gt;Kid_First_Middle_B = Catt(Kid_First_B," ",Kid_Middle_B);&lt;BR /&gt;Kid_Last_Suffix_B = Catt(Kid_Last_B ," ",Kid_Suffix_B);&lt;/P&gt;
&lt;P&gt;If Mom_First_B Eq "" And Mom_First_R NE "" Then Mom_First_B = Mom_First_R;&lt;BR /&gt;If Mom_Middle_B Eq "" And Mom_Middle_R NE "" Then Mom_Middle_B = Mom_Middle_R;&lt;BR /&gt;If Mom_Maiden_B Eq "" And Mom_Maiden_R NE "" Then Mom_Maiden_B = Mom_Maiden_R;&lt;BR /&gt;If Mom_Last_B Eq "" And Mom_Last_R NE "" Then Mom_Last_B = Mom_Last_R;&lt;BR /&gt;If Mom_Full_B Eq "" And Mom_Full_R NE "" Then Mom_Full_B = Mom_Full_R;&lt;/P&gt;
&lt;P&gt;Run;&lt;BR /&gt;;&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 22:39:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Field-type-isn-t-staying-the-same-between-datasteps/m-p/744064#M233047</guid>
      <dc:creator>BJM</dc:creator>
      <dc:date>2021-05-26T22:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: Field type isn't staying the same between datasteps</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Field-type-isn-t-staying-the-same-between-datasteps/m-p/744068#M233048</link>
      <description>&lt;P&gt;You haven't defined&amp;nbsp;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;Hold_Mom_Middle_R&lt;/FONT&gt; anywhere, so SAS creates it for you. As a numeric.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Unless it's in one of the input tables?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 May 2021 00:25:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Field-type-isn-t-staying-the-same-between-datasteps/m-p/744068#M233048</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-05-27T00:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: Field type isn't staying the same between datasteps</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Field-type-isn-t-staying-the-same-between-datasteps/m-p/744071#M233049</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BJM_0-1622076095605.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/59797i988BF6DAFC3F90AC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BJM_0-1622076095605.png" alt="BJM_0-1622076095605.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The original field Mom_Middle_R exists in the Registry dataset and when I attempt to merge with another file, it insists the field is numeric.&lt;/P&gt;</description>
      <pubDate>Thu, 27 May 2021 00:42:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Field-type-isn-t-staying-the-same-between-datasteps/m-p/744071#M233049</guid>
      <dc:creator>BJM</dc:creator>
      <dc:date>2021-05-27T00:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: Field type isn't staying the same between datasteps</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Field-type-isn-t-staying-the-same-between-datasteps/m-p/744073#M233051</link>
      <description>&lt;P&gt;That suggests that in the dataset you haven't supplied a screenshot for that variable is defined as numeric as the one you have in your post is definitely character.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please post the SAS log of the DATA step where you are getting the error so we can more clearly understand what is happening.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 May 2021 01:12:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Field-type-isn-t-staying-the-same-between-datasteps/m-p/744073#M233051</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-05-27T01:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: Field type isn't staying the same between datasteps</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Field-type-isn-t-staying-the-same-between-datasteps/m-p/744074#M233052</link>
      <description>&lt;P&gt;&amp;gt;&amp;nbsp;&lt;SPAN&gt;The original field Mom_Middle_R exists in the Registry dataset&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Read my comment again. I am not referring to existing variable&amp;nbsp;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;Mom_Middle_R&lt;/FONT&gt;. but to a new variable being created as it's coming out of nowhere and is used in the code.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 May 2021 01:44:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Field-type-isn-t-staying-the-same-between-datasteps/m-p/744074#M233052</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-05-27T01:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: Field type isn't staying the same between datasteps</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Field-type-isn-t-staying-the-same-between-datasteps/m-p/744137#M233076</link>
      <description>&lt;P&gt;It should inherit the field type from how it is created.&lt;/P&gt;
&lt;P&gt;Hold_Mom_Middle_R =&amp;nbsp;Mom_Middle_R;&lt;/P&gt;</description>
      <pubDate>Thu, 27 May 2021 13:16:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Field-type-isn-t-staying-the-same-between-datasteps/m-p/744137#M233076</guid>
      <dc:creator>BJM</dc:creator>
      <dc:date>2021-05-27T13:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: Field type isn't staying the same between datasteps</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Field-type-isn-t-staying-the-same-between-datasteps/m-p/744210#M233127</link>
      <description>&lt;P&gt;The first place that variable appears in the code you show is&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;*Mom_Middle_R =Put(Hold_Mom_Middle_R,$50.);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is no&lt;/P&gt;
&lt;P&gt;Hold_Mom_Middle_R = Mom_Middle_R;&lt;/P&gt;
&lt;P&gt;shown in the code you posted. Do a search using the search feature for text in your browser for Hold_Mom_Middle_R and see what comes up. That assignment doesn't.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So since Hold_Mom_Middle_R is not define prior to use SAS assumes it is numeric.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 May 2021 16:07:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Field-type-isn-t-staying-the-same-between-datasteps/m-p/744210#M233127</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-05-27T16:07:39Z</dc:date>
    </item>
  </channel>
</rss>

