SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 69899: Calling a user-defined function with the PROC FORMAT OTHER= argument can cause SAS® to stop responding

DetailsHotfixAboutRate It

When you call a user-defined function that was created by the FCMP procedure with the OTHER= argument in the FORMAT procedure, SAS might stop responding. This issue occurs if the variable name in the assignment statement is the same as the argument that is passed to the PROC FCMP function. The following sample code replicates this behavior:

proc format;
  value $stlight
  'G' = 'Green'
  'R' = 'Red'
  'Y' = 'Yellow';
run;
data one;
  input value $ type $ amount;
  datalines;
g min 2
G sec 30
R min 1
y sec 10
Y sec 30
;
run;
proc fcmp outlib=work.funcs.simple;
  function stoplight (str $) $;
   str=upcase(str);
   color=put(str,$stlight.);
  return(color);
endfunc;
quit;
options cmplib=work.funcs;
proc format;
  value $lightchange other=[stoplight()];
run;
data two;
  set one;
  length colorname $10;
  colorname=put(value, $lightchange10.);
  upcolor=stoplight(value);
run;

If you modify the PROC FCMP code to create a new variable name in the assignment statement, SAS does not stop responding. Here is the modified PROC FCMP code:

proc fcmp outlib=work.funcs.simple;
  function stoplight (str $) $;
   mystr=upcase(str);
   color=put(mystr,$stlight.);
  return(color);
endfunc;
quit;

Click the Hot Fix tab in this note to access the hot fix for this issue.



Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemBase SASz/OS9.4 TS1M7
z/OS 64-bit9.4 TS1M7
Microsoft® Windows® for x649.4 TS1M7
Microsoft Windows 8 Enterprise 32-bit9.4 TS1M7
Microsoft Windows 8 Enterprise x649.4 TS1M7
Microsoft Windows 8 Pro 32-bit9.4 TS1M7
Microsoft Windows 8 Pro x649.4 TS1M7
Microsoft Windows 8.1 Enterprise 32-bit9.4 TS1M7
Microsoft Windows 8.1 Enterprise x649.4 TS1M7
Microsoft Windows 8.1 Pro 32-bit9.4 TS1M7
Microsoft Windows 8.1 Pro x649.4 TS1M7
Microsoft Windows 109.4 TS1M7
Microsoft Windows 119.4 TS1M7
Microsoft Windows Server 20089.4 TS1M7
Microsoft Windows Server 2008 R29.4 TS1M7
Microsoft Windows Server 2008 for x649.4 TS1M7
Microsoft Windows Server 2012 Datacenter9.4 TS1M7
Microsoft Windows Server 2012 R2 Datacenter9.4 TS1M7
Microsoft Windows Server 2012 R2 Std9.4 TS1M7
Microsoft Windows Server 2012 Std9.4 TS1M7
Microsoft Windows Server 20169.4 TS1M7
Microsoft Windows Server 20199.4 TS1M7
Microsoft Windows Server 20229.4 TS1M7
Windows 7 Enterprise 32 bit9.4 TS1M7
Windows 7 Enterprise x649.4 TS1M7
Windows 7 Home Premium 32 bit9.4 TS1M7
Windows 7 Home Premium x649.4 TS1M7
Windows 7 Professional 32 bit9.4 TS1M7
Windows 7 Professional x649.4 TS1M7
Windows 7 Ultimate 32 bit9.4 TS1M7
Windows 7 Ultimate x649.4 TS1M7
64-bit Enabled AIX9.4 TS1M7
64-bit Enabled Solaris9.4 TS1M7
HP-UX IPF9.4 TS1M7
Linux for x649.4 TS1M7
Solaris for x649.4 TS1M7
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.