Category: | Field reference |
Applies to: | Java object |
j
is instantiated, and then
the field values are set and retrieved using the GETSTATICtypeFIELD method.
/* Java code */ import java.util.*; import java.lang.*; public class ttest { public int i; public double d; public string s; } }
/* DATA step code */ data _null_; dcl javaobj j("ttest"); length val 8; length str $20; j.setStaticIntField("i", 100); j.setStaticDoubleField("d", 3.14159); j.setStaticStringField("s", "abc"); j.getStaticIntField("i", val); put val=; j.getStaticDoubleField("d", val); put val=; j.getStaticStringField("s", str); put str=; run;