cancel
Showing results for 
Search instead for 
Did you mean: 

Using PAL Procedures embeded in SQL Script (anonymous blocks)

dirk_meyer2
Explorer

Hi all,
I stumbled over a change in behaviour of PAL Procedures after i embedded them in an anonymous srip blog.
My idea is to make certain procedure with dynamic programing easier to us/reuse.

As an exampel serves PAL_MULTIVARIATE_ANALYSIS
In the documentation example it is fed with local temporary table and the result table can be defined relativly flexibe. The column names do not have to be identical with the input cols.

As soon as I use "Do Begin - End" the behaviour completely changes.
This seems necessary for usage of DECLARE.
Only table variables are accepted in and out. The naming of outtab has to be exactly like the intab (plus the first col).  With that necessity the hole thing gets more complicated in order to declare tabs dynamicly.
With APL I think its the same drama.

Why is that so and is there a propper not tinker work arround. 
Maybe its just my limited experience with SQL sripting and as so as it is again stored as procedure its all diffenrent again.

Very gratefull for all helpful clues.
Dirk

View Entire Topic
dirk_meyer2
Explorer
0 Kudos

Hi, 

Thanks for the response.
With the code exaples inthe latest APL Version it is indeed solved different.

Problem is that I can not find any sources on Scripting that get a bit deeper into the consequences of Do Begin as if this is a standard behaviour, how to set it strategically (found out that you can do it multiple time in a sequnce) and what the advantages are.
The books and how tos in know only do that on a "Hello World" level.

Python is and also not that of an option since.
Installation of ML is blocked by security and starting to deal with opening ports is mor dreadful than dealing with Scripting which some competence is handy too.