Problem Note 57730: A custom format that is permanently assigned to a variable cannot be updated in the same SAS® Studio session
A custom format that is permanently assigned to a variable in a DATA step in SAS Studio cannot be updated in the same session.
The code below illustrates an example. If you create a custom format called WFM, assign it as a permanent format to a variable in a DATA step and print the data set, the results are printed correctly.
proc format lib=libref;
value wfm
low-100 = 'low'
other = 'high'
;
run;
data class;
set sashelp.class;
format weight wfm.;
run;
proc print data=class (obs=5);
var name weight;
run;
If you then change the custom format definition and print the same data set, the updated format is not used.
proc format lib=libref;
value wfm
low-100 = 'L'
other = 'H'
;
run;
proc print data=class (obs=5);
var name weight;
run;
You must exit or reset your SAS Studio session in order to apply the updated format.
To circumvent the problem, use the format in a procedure step rather than permanently assigning it to the variable. For example:
proc format lib=work;
value wfm
low-100 = 'low'
other = 'high'
;
run;
data class;
set sashelp.class;
run;
proc print data=class (obs=5);
format weight wfm.;
var name weight;
run;
When you use a format in a procedure step, any changes to the format definition are reflected in the results in the same session.
Operating System and Release Information
SAS System | SAS Studio | Microsoft Windows 8 Pro 32-bit | 3.4 | 3.4 | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft Windows 8 Pro x64 | 3.4 | 3.4 | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft Windows 8.1 Enterprise 32-bit | 3.4 | 3.4 | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft Windows 8.1 Enterprise x64 | 3.4 | 3.4 | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft Windows 8.1 Pro 32-bit | 3.4 | 3.4 | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft Windows 8.1 Pro x64 | 3.4 | 3.4 | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft Windows 10 | 3.4 | 3.4 | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft Windows Server 2008 | 3.4 | 3.4 | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft Windows Server 2008 R2 | 3.4 | 3.4 | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft Windows Server 2008 for x64 | 3.4 | 3.4 | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft Windows Server 2012 Datacenter | 3.4 | 3.4 | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft Windows Server 2012 R2 Datacenter | 3.4 | 3.4 | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft Windows Server 2012 R2 Std | 3.4 | 3.4 | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft Windows Server 2012 Std | 3.4 | 3.4 | 9.4 TS1M3 | 9.4 TS1M4 |
Windows 7 Enterprise 32 bit | 3.4 | 3.4 | 9.4 TS1M3 | 9.4 TS1M4 |
Windows 7 Enterprise x64 | 3.4 | 3.4 | 9.4 TS1M3 | 9.4 TS1M4 |
Windows 7 Home Premium 32 bit | 3.4 | 3.4 | 9.4 TS1M3 | 9.4 TS1M4 |
Windows 7 Home Premium x64 | 3.4 | 3.4 | 9.4 TS1M3 | 9.4 TS1M4 |
Windows 7 Professional 32 bit | 3.4 | 3.4 | 9.4 TS1M3 | 9.4 TS1M4 |
Windows 7 Professional x64 | 3.4 | 3.4 | 9.4 TS1M3 | 9.4 TS1M4 |
Windows 7 Ultimate 32 bit | 3.4 | 3.4 | 9.4 TS1M3 | 9.4 TS1M4 |
Windows 7 Ultimate x64 | 3.4 | 3.4 | 9.4 TS1M3 | 9.4 TS1M4 |
64-bit Enabled AIX | 3.4 | 3.4 | 9.4 TS1M3 | 9.4 TS1M4 |
64-bit Enabled Solaris | 3.4 | 3.4 | 9.4 TS1M3 | 9.4 TS1M4 |
HP-UX IPF | 3.4 | 3.4 | 9.4 TS1M3 | 9.4 TS1M4 |
Linux for x64 | 3.4 | 3.4 | 9.4 TS1M3 | 9.4 TS1M4 |
Solaris for x64 | 3.4 | 3.4 | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft Windows 8 Enterprise x64 | 3.4 | 3.4 | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft Windows 8 Enterprise 32-bit | 3.4 | 3.4 | 9.4 TS1M3 | 9.4 TS1M4 |
Microsoft® Windows® for x64 | 3.4 | 3.4 | 9.4 TS1M3 | 9.4 TS1M4 |
*
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.
Type: | Problem Note |
Priority: | high |
Topic: | Data Management ==> Manipulation and Transformation ==> User Written Formats
|
Date Modified: | 2016-02-29 15:18:35 |
Date Created: | 2016-02-25 15:23:01 |