<?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: Flooring array variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668549#M200428</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No that is not correct, with MAX(a,b) the result would be whichever higher, so if max(0.05,0.10) then i want 0.10...so max is the correct function&lt;/P&gt;</description>
    <pubDate>Sat, 11 Jul 2020 11:51:22 GMT</pubDate>
    <dc:creator>Sam13</dc:creator>
    <dc:date>2020-07-11T11:51:22Z</dc:date>
    <item>
      <title>Flooring array variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668526#M200413</link>
      <description>&lt;P&gt;I am trying to floor an array variable LGD to a value of 10% , i've tried two different methods but they both did not work, i do not see why! the code does not generate an error but it just does not floor the array variable, below are two methods i've tried (max function &amp;amp; if then statement), can anyone tell where is the problem please? (note the code is working fine without the flooring issue, i am only including the relevant part)&lt;/P&gt;&lt;P&gt;&lt;U&gt;Method 1(max function)&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DO I = 1 TO 100&lt;/P&gt;&lt;P&gt;LGD[I] = max(ROUND(PPDA[I]* ((EAD[I]-RECOVERY[I])/EAD[I]),0.000001),0.10);&lt;BR /&gt;END;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Method 2(if then statement)&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DO I = 1 TO 100&lt;/P&gt;&lt;P&gt;LGD[I] = ROUND(PPDA[I]* ((EAD[I]-RECOVERY[I])/EAD[I]),0.000001);&lt;BR /&gt;if LGD[I] &amp;lt;0.10 then LGD[I]=0.10 else LGD[I]=LGD[I] ;&lt;BR /&gt;END;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jul 2020 09:18:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668526#M200413</guid>
      <dc:creator>Sam13</dc:creator>
      <dc:date>2020-07-11T09:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: Flooring array variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668527#M200414</link>
      <description>hope you used the array statement. &lt;BR /&gt;&lt;BR /&gt;Could you please post the log as well , also sample data</description>
      <pubDate>Sat, 11 Jul 2020 09:32:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668527#M200414</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2020-07-11T09:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: Flooring array variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668528#M200415</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12151"&gt;@Jagadishkatam&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As i mentioned the codes are working fine before i floored them using the max statement in method 1 or the if-then ststement in method 2, i could not post the entire code or data for confidentiality issue, but there was no problem with the code. I am so frustrated why these two methods are not flooring, there is no error generated at all!!!!!&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jul 2020 09:37:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668528#M200415</guid>
      <dc:creator>Sam13</dc:creator>
      <dc:date>2020-07-11T09:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: Flooring array variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668532#M200416</link>
      <description>&lt;P&gt;Doesn't work is awful vague.&lt;BR /&gt;&lt;BR /&gt;Are there errors in the log?: Post the code and log in a code box opened with the &amp;lt;&amp;gt; to maintain formatting of error messages.&lt;BR /&gt;&lt;BR /&gt;No output? Post any log in a code box.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat&lt;/A&gt;... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the &amp;lt;/&amp;gt; icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One thing, entire data step code is really the way to go because then we can see if there might be something else causing issues.&lt;/P&gt;
&lt;P&gt;Second, data: input and expected output. There really is very little in the way of diagnosis that can be done without data values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jul 2020 10:27:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668532#M200416</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-07-11T10:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: Flooring array variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668536#M200418</link>
      <description>&lt;P&gt;What are the results you get without the MAX() function? Are they in fact smaller than 0.1?&lt;/P&gt;
&lt;P&gt;Anyway, please post example data, and&amp;nbsp;the &lt;EM&gt;complete&lt;/EM&gt; log of the step.&lt;/P&gt;
&lt;P&gt;Use this button to post the log:&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"&gt;&lt;img src="https://communities.sas.com/skins/images/70F8802BAA6255D55FBEC62A8226FB10/responsive_peak/images/image_not_found.png" alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;and the "little running man" right next to it for the example datalines data step.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jul 2020 10:48:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668536#M200418</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-07-11T10:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: Flooring array variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668540#M200422</link>
      <description>&lt;P&gt;Flooring means using the min() function. Not the max () function.&lt;/P&gt;
&lt;P&gt;You want at least 10%. 10% is the minimum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jul 2020 11:27:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668540#M200422</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-07-11T11:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: Flooring array variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668544#M200425</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply. the result you get is the same without doing the max function meaning the max function or even the other methods are doing nothing, the values are below 0.1 for sure and there is no error whatsoever i see the max statement in there with no error, it is so strange! i am not new to SAS that is why i am so frustrated as i can see no problem in the code but getting no flooring results!!&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jul 2020 11:42:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668544#M200425</guid>
      <dc:creator>Sam13</dc:creator>
      <dc:date>2020-07-11T11:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: Flooring array variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668545#M200426</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/336982"&gt;@Sam13&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We're frustrated too. People have asked to see your LOG and your data, and you haven't provided those. Providing the LOG as requested and (a portion of) the data as requested is the fastest way to solve this problem.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jul 2020 11:45:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668545#M200426</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-07-11T11:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: Flooring array variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668548#M200427</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is part of the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Data table1;

set table2;



DO I = 1 TO (REMAINING_TERM + 2); 


DEFFTV[I] = PUT(EAD[I] / ((CURRENT_COLLATERAL_VALUE/CURR_HPI)*HPI[I]),FTVBAND.);


DEF_FTV_BAND = DEFFTV[I];

CALL MISSING(PPD);

IF DEF_FTV_BAND NE 0 THEN DO;

RC = PPDH.FIND(KEY:DEF_FTV_BAND);

PPDA[I] = PPD; 

VAS[I] = ((CURRENT_COLLATERAL_VALUE/CURR_HPI)*HPI[I+TTS]);

RECOVERY[I] = MIN(((1-FSD)*VAS[I])-MAX(FIXED_RECOVERY_COST,(VAS[I]*'Variable_Recovery Cost'n)),EAD[I])/(SUM(1,EPR)**(TTS/12));

** Final LGD value; 
LGD[I] = max(ROUND(PPDA[I]* ((EAD[I]-RECOVERY[I])/EAD[I]),0.000001),0.10);

END;

** IF FTV is missing, 0 or negative then LGD is set to missing; 
ELSE LGD[I] = .;

END;

RUN;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jul 2020 11:49:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668548#M200427</guid>
      <dc:creator>Sam13</dc:creator>
      <dc:date>2020-07-11T11:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: Flooring array variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668549#M200428</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No that is not correct, with MAX(a,b) the result would be whichever higher, so if max(0.05,0.10) then i want 0.10...so max is the correct function&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jul 2020 11:51:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668549#M200428</guid>
      <dc:creator>Sam13</dc:creator>
      <dc:date>2020-07-11T11:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: Flooring array variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668550#M200429</link>
      <description>&lt;P&gt;You have a FIND() method call to an undefined hash object; this code CANNOT WORK.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please post:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;EXAMPLE DATA&lt;/STRONG&gt; in a data step with datalines. DO NOT SKIP THIS STEP!&lt;/P&gt;
&lt;P&gt;The &lt;STRONG&gt;COMPLETE LOG&lt;/STRONG&gt; of your step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/336982"&gt;@Sam13&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is part of the code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Data table1;

set table2;



DO I = 1 TO (REMAINING_TERM + 2); 


DEFFTV[I] = PUT(EAD[I] / ((CURRENT_COLLATERAL_VALUE/CURR_HPI)*HPI[I]),FTVBAND.);


DEF_FTV_BAND = DEFFTV[I];

CALL MISSING(PPD);

IF DEF_FTV_BAND NE 0 THEN DO;

RC = PPDH.FIND(KEY:DEF_FTV_BAND);

PPDA[I] = PPD; 

VAS[I] = ((CURRENT_COLLATERAL_VALUE/CURR_HPI)*HPI[I+TTS]);

RECOVERY[I] = MIN(((1-FSD)*VAS[I])-MAX(FIXED_RECOVERY_COST,(VAS[I]*'Variable_Recovery Cost'n)),EAD[I])/(SUM(1,EPR)**(TTS/12));

** Final LGD value; 
LGD[I] = max(ROUND(PPDA[I]* ((EAD[I]-RECOVERY[I])/EAD[I]),0.000001),0.10);

END;

** IF FTV is missing, 0 or negative then LGD is set to missing; 
ELSE LGD[I] = .;

END;

RUN;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jul 2020 11:56:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668550#M200429</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-07-11T11:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: Flooring array variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668551#M200430</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the code is not new, it was functioning for weeks and all is fine, I was asked to floor the LGD variable and I only added the max function, so FIND() method or any of the rest were already there and working absolutely fine, I only need to floor the LGD[I] values, that is all&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jul 2020 12:02:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668551#M200430</guid>
      <dc:creator>Sam13</dc:creator>
      <dc:date>2020-07-11T12:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: Flooring array variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668552#M200431</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is part of the log:&lt;/P&gt;&lt;PRE&gt; MPRINT(RUN_ALL):   DO I = 1 TO (REMAINING_TERM + 2);
 MPRINT(RUN_ALL):   DEFFTV[I] = PUT(EAD[I] / ((CURRENT_COLLATERAL_VALUE/CURR_HPI)*HPI[I]),FTVBAND.);
 MPRINT(RUN_ALL):   ** Forecasted FTV at default calculated to merge on correct PPD;
 MPRINT(RUN_ALL):   DEF_FTV_BAND = DEFFTV[I];
 MPRINT(RUN_ALL):   CALL MISSING(PPD);
 MPRINT(RUN_ALL):   IF DEF_FTV_BAND NE 0 THEN DO;
 MPRINT(RUN_ALL):   RC = PPDH.FIND(KEY:DEF_FTV_BAND);
 MPRINT(RUN_ALL):   PPDA[I] = PPD;
 MPRINT(RUN_ALL):   ** Valuation at sale (VAS) calculated to work out total recoverable amount before costs;
 MPRINT(RUN_ALL):   VAS[I] = ((CURRENT_COLLATERAL_VALUE/CURR_HPI)*HPI[I+TTS]);
 MPRINT(RUN_ALL):   ** Expected reovery amount after forced sale discount and reocovery costs applied;
 MPRINT(RUN_ALL):   RECOVERY[I] = MIN(((1-FSD)*VAS[I])-MAX(FIXED_RECOVERY_COST,(VAS[I]*'Variable_Recovery 
 Cost'n)),EAD[I])/(SUM(1,EPR)**(TTS/12));
 MPRINT(RUN_ALL):   ** Final LGD value;
 MPRINT(RUN_ALL):   LGD[I] = max(ROUND(PPDA[I]* ((EAD[I]-RECOVERY[I])/EAD[I]),0.000001),0.05);
 MPRINT(RUN_ALL):   END;
 MPRINT(RUN_ALL):   ** IF FTV is missing, 0 or negative then LGD is set to missing;
 MPRINT(RUN_ALL):   ELSE LGD[I] = .;
 MPRINT(RUN_ALL):   END;
 MPRINT(RUN_ALL):   RUN;&lt;/PRE&gt;</description>
      <pubDate>Sat, 11 Jul 2020 12:04:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668552#M200431</guid>
      <dc:creator>Sam13</dc:creator>
      <dc:date>2020-07-11T12:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: Flooring array variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668553#M200432</link>
      <description>&lt;P&gt;Since you do not show any real willingness of helping us to help you (no data, incomplete log - this was the first time you showed that this is&amp;nbsp;&lt;STRONG&gt;part of a macro&lt;/STRONG&gt;!), I'll post this once to prove that "flooring" with the MAX() function &amp;nbsp;works:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
input x;
format x y 5.2;
y = max(x,0.1);
datalines;
0.12
0.09
;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;so it is in the other code you did not show us, or in the data, or both. Make your choice, I'm outta here.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jul 2020 12:36:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668553#M200432</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-07-11T12:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: Flooring array variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668558#M200435</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/336982"&gt;@Sam13&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your "part of the log" does not show any NOTEs and other messages which could help diagnosing the issue. For example, I'm pretty sure there is a note&lt;/P&gt;
&lt;PRE&gt;&lt;FONT color="#3366FF"&gt;NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column).&lt;/FONT&gt; ...&lt;/PRE&gt;
&lt;P&gt;because the value of &lt;FONT face="courier new,courier"&gt;PUT(..., FTVBAND.)&lt;/FONT&gt; (line 2) is a &lt;EM&gt;character&lt;/EM&gt; value, but eventually this value is compared to the &lt;EM&gt;numeric&lt;/EM&gt; value 0 in the IF condition, which in my opinion is questionable programming style.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That said, the log shows that the second argument of the MAX function has changed from 0.1 (in your earlier posts) to &lt;STRONG&gt;0.05&lt;/STRONG&gt;. So, with &lt;EM&gt;this&lt;/EM&gt; code values &amp;lt;0.1 would be no surprise.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I had to investigate the issue, I would insert a diagnostic PUT statement after the ELSE statement, e.g.:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  if .z&amp;lt;lgd[i]&amp;lt;0.05 then do;
    put _all_;
    stop;
  end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This might still be insufficient because if the arrays PPDA etc. were &lt;FONT face="courier new,courier"&gt;_temporary_&lt;/FONT&gt; arrays, their values would not be displayed (then you'd need to list the relevant array elements in the PUT statement once you know their index &lt;FONT face="courier new,courier"&gt;I&lt;/FONT&gt;, e.g., &lt;FONT face="courier new,courier"&gt;PPDA[17]&lt;/FONT&gt;). But we don't know what type the arrays are because you haven't shown any ARRAY statements so far.&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jul 2020 13:13:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668558#M200435</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2020-07-11T13:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: Flooring array variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668625#M200452</link>
      <description>My bad. You are right of course. That will teach me not to reply at midnight. I hope... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 12 Jul 2020 01:24:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668625#M200452</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-07-12T01:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: Flooring array variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668646#M200463</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/336982"&gt;@Sam13&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is part of the code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Data table1;

set table2;



DO I = 1 TO (REMAINING_TERM + 2); 


DEFFTV[I] = PUT(EAD[I] / ((CURRENT_COLLATERAL_VALUE/CURR_HPI)*HPI[I]),FTVBAND.);


DEF_FTV_BAND = DEFFTV[I];

CALL MISSING(PPD);

IF DEF_FTV_BAND NE 0 THEN DO;

RC = PPDH.FIND(KEY:DEF_FTV_BAND);

PPDA[I] = PPD; 

VAS[I] = ((CURRENT_COLLATERAL_VALUE/CURR_HPI)*HPI[I+TTS]);

RECOVERY[I] = MIN(((1-FSD)*VAS[I])-MAX(FIXED_RECOVERY_COST,(VAS[I]*'Variable_Recovery Cost'n)),EAD[I])/(SUM(1,EPR)**(TTS/12));

** Final LGD value; 
LGD[I] = max(ROUND(PPDA[I]* ((EAD[I]-RECOVERY[I])/EAD[I]),0.000001),0.10);

END;

** IF FTV is missing, 0 or negative then LGD is set to missing; 
ELSE LGD[I] = .;

END;

RUN;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Would generate a bunch of undefined array references.&lt;/P&gt;
&lt;P&gt;Where are the arrays defined?&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jul 2020 15:14:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flooring-array-variable/m-p/668646#M200463</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-07-12T15:14:08Z</dc:date>
    </item>
  </channel>
</rss>

