09-19-2014 08:28 AM
I'm trying to invoke a method from a submit...endsubmit block in SCL - basically its something like this:
Where dist is an instance of a class which has the get method.
Is this even possible? Putting & in front of the invocation makes it look for an attribute :/
09-19-2014 12:13 PM
Review the preview concepts. SAS(R) Component Language 9.4: Reference, Third Edition
Within submit endsubmit you are building up some code in a buffer to be execute by sas (datastep). Something like macro-processing.
By that invoking a method in the middle of building up that code does not make sense.
09-20-2014 05:34 AM
When its a procedure-type method, agreed - but what about functions? You can certainly access variables from the submit block (like, substituting &<var> with appropriate text) - wouldn't computing the function result and substituting it be somewhat the same thing? Sorry if my questions seem naive, but I'm very new to SAS and SCL and still somewhat confused with the preview concept...:/
09-20-2014 06:34 AM
SCL better to be associated AF is an older programming environment classified as object-oriented hyping in the start of the 1990's.
SCL is different to macro and base as it is always a compiled execution (catalog version/machine dependent).
The first replacement would be by rebuilding as java using app-dev studio (failed). By now it is more SAS-portal (BI/DI) and SAS-VA.
Some language concepts of SCL can be found in the new DS2 language. SAS(R) 9.4 DS2 Language Reference, Third Edition
A lot functions previous only did exist in SCL have been implemented in the standard base environment with 9.3.
The link to text substitution was in my previous link. SAS(R) Component Language 9.4: Reference, Third Edition
You can use scl variables and macro variables at that, but should avoid naming conflicts. You can use macro functions.
But when you are modifying the text in that buffer (dynamic code) how would you invoke a to be compiled scl function. SCL is not interpreter based, it is compiled. There is your limitation as of a basic concept.