Actually the terminology for SPAs applies also to UDFs (user defined
functions).

The SQL DDL for a UDF includes the name of the external load module (8 char
load module) and the WLM environment which in some of the IBM example code
is something like WLMENV1.

WLM starts up an address space to execute the SP or UDF. The WLM address
space is configured with number of tasks with (NUMTCB) etc.

A simple example is the DSN8.DAYNAME UDF. The DDL is shown below:

CREATE FUNCTION DSN8.DAYNAME
(VARCHAR(10) FOR SBCS DATA CCSID EBCDIC)
RETURNS VARCHAR(9) FOR SBCS DATA CCSID EBCDIC
SPECIFIC DSN8EUDNV
EXTERNAL NAME 'DSN8EUDN'
LANGUAGE C
DETERMINISTIC PARAMETER STYLE DB2SQL FENCED
CALLED ON NULL INPUT NO SQL NO EXTERNAL ACTION NO SCRATCHPAD
NO FINAL CALL ALLOW PARALLEL NO DBINFO NO COLLID
WLM ENVIRONMENT DB28WLM1 ASUTIME LIMIT 5 STAY RESIDENT NO
PROGRAM TYPE SUB SECURITY DB2 STOP AFTER SYSTEM DEFAULT FAILURES
INHERIT SPECIAL REGISTERS ;

So at our shop we have a WLM address space called DB28WLM1. The external
function is coded in C.




On 2/12/08, Dave Barry <[EMAIL PROTECTED]> wrote:
>
> Jerry,
>
> What your customer means to say is they have a COBOL module invoked by
> DB2 which runs in a WLM-managed stored procedure address space (SPAS).
>
> There used to be a single SPAS per DB2 subsystem instance.  It was the
> "environment" in which one or more stored procedures would be queued by
> DB2 as subtasks.  Now one or more SPASes may be started by WLM and
> managed to a maximum number of subtasks each.  When DB2 calls the
> procedure, WLM makes the decision as to which SPAS the request is queued
> and whether an additional SPAS is needed.  The set of SPASes are known
> collectively as the "application environment."
>
> db
>
> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
> Behalf Of Support, DUNNIT SYSTEMS LTD.
> Sent: Thursday, February 07, 2008 2:50 PM
> To: [email protected]
> Subject: Re: WLM for toddlers
>
> It's me, the guy who started this thread. I'm not actually sure I got an
> aswer to my original question. Maybe this will help.
>
> We have a customer who says they have a:
>
> "compiled/linked COBOL load module invoked from a DB2 sp that runs in
> the WLM address space."
>
> That's what I need to understand. Does the COBOL module actually run
> within the WLM address space? Or does it run in a separate started task
> and such started tasks are what the SPs run within? Or can it be both
> and, if so, what determines where the COBOL module runs?
>
> TIA,
> Jerry
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
> Search the archives at http://bama.ua.edu/archives/ibm-main.html
>



-- 
Wayne V. Bickerdike

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to