There is more than one way to skin this cat, but the traditional way
to pass the DB2 plan name to DLI batch programs is to use the DDLITV02
dd statement.  (The last two parameters are the Plan and Program names
and don't have to be the same).

//*                        -PLAN---PROGRAM--
//DDITV02      DD *
  DSN2,SYS1,DSNMIN10,,A,-,,XIFBB43,CIFBB43
/*

And the EXEC statement resembles:

//IFB43    EXEC PGM=DFSRRC00,REGION=4000K,
//         PARM='DLI,DSNMTV01,CIFBB43,10,0000,,0,,N,0,T,,,,,,Y'

DSNMTV01 is the DLI interface program.  It launches the program
specified in the DDITV02 dd using the Plan that is also specified
there.

On Thu, Sep 17, 2009 at 11:42 AM, Frank Swarbrick
<[email protected]> wrote:
> For a regular batch program, yes.  Unfortunately most of our programs are 
> IMS, and as far as I know you cannot pass PARM data down to the application 
> program.
>
> For those who don't know IMS, this is how an IMS batch program is executed:
>
> //STEP01    EXEC PGM=DFSRRC00,
> //             PARM=(DLI,DDADMP,DDMPPSB)
>
> DFSRRC00 is the IMS driver program, which calls DL/I application program 
> called DDADMP using a DL/I PSB called DDMPPSB.
>
> Obviously I could use a separate dataset to contain the plan et all, but then 
> I can't use symbolic parms.
>
> Frank
>
> On 9/17/2009 at 9:36 AM, in message
> <[email protected]>, Don Leahy
> <[email protected]> wrote:
>> FWIW, I usually specify the plan via a PARM.  Would this not suit your
>> purpose?
>>
>> On Thu, Sep 17, 2009 at 11:27 AM, Frank Swarbrick
>> <[email protected]> wrote:
>>> How on earth did you guess what I wanted to use this for?  This is exactly
>> it.  I want a way to set a DB2 plan using symbolics and have the program be
>> able to read it.
>>>
>>> So do you have some code that you use to extract the DSN from the DB2PLAN
>> DD?
>>>
>>> Someone suggested the DYNALLOC macro, and I've been fiddling with that but
>> not yet got it figured out.  (Not being an assembler programmer...)
>>> Haven't tried the other method yet.
>>>
>>> Thanks!
>>> Frank
>>>
>>> On 9/17/2009 at 9:11 AM, in message
>>> <listserv%[email protected]>, Victor Gil
>>> <[email protected]> wrote:
>>>> Frank,
>>>>
>>>> The ONLY way I've found to pass a short string [up to 8 bytes] via
>>>> a "temporary" DD is:
>>>>
>>>> //    SET PLAN=PLANNAME
>>>> //DB2PLAN  DD   DISP=(,PASS),SPACE=(0,0),DSN=&&amp;&PLAN
>>>>
>>>> the above DSN will be formatted by JES as
>>>>
>>>> //DB2PLAN DD DSN=SYSxxxxx.Txxxxxx.RAxxx.xxxxxxxx.PLANNAME.Hxx
>>>>
>>>> from where you CAN get the desired PLANNAME.
>>>>
>>>> For longer strings consider multiple temporary DDs.
>>>>
>>>> HTH,
>>>> -Victor-
>>>>
>>>> On Wed, 16 Sep 2009 09:04:24 -0600, Frank Swarbrick
>>>> <[email protected]> wrote:
>>>>
>>>>>I believe I have seen something like the following:
>>>>>//FJSTEST  JOB NOTIFY=&SYSUID
>>>>>//STEP01   EXEC PGM=MYPGM
>>>>>//DUMMME   DD DUMMY,DSN='THIS.IS.A.TEST'
>>>>>
>>>>>What does MYPGM need to do in order to retrieve the DSN value of the DD
>>>> named DUMMME?
>>>>>
>>>>>A general pointer in the right direction would be nice.
>>>>>Specific examples would be great!  :-)
>>>>>
>>>>>Thanks,
>>>>>Frank
>>>>>
>>>>>
>>>>>>>>
>>>>>
>>>>>The information contained in this electronic communication and any
>>>> document attached hereto or transmitted herewith is confidential and
>>>> intended for the exclusive use of the individual or entity named above.  If
>>>> the
>>>> reader of this message is not the intended recipient or the employee or
>>>> agent
>>>> responsible for delivering it to the intended recipient, you are hereby
>>>> notified
>>>> that any examination, use, dissemination, distribution or copying of this
>>>> communication or any part thereof is strictly prohibited.  If you have
>>>> received
>>>> this communication in error, please immediately notify the sender by reply 
>>>> e-
>>>> mail and destroy this communication.  Thank you.
>>>>>
>>>>>--
>>>>>
>>>>>Frank Swarbrick
>>>>>Applications Architect - Mainframe Applications Development
>>>>>FirstBank Data Corporation - Lakewood, CO  USA
>>>>>P: 303-235-1403
>>>>>
>>>>>----------------------------------------------------------------------
>>>>>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
>>>>
>>>> ----------------------------------------------------------------------
>>>> 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
>>>
>>>
>>>
>>>>>>
>>>
>>> The information contained in this electronic communication and any document
>> attached hereto or transmitted herewith is confidential and intended for the
>> exclusive use of the individual or entity named above.  If the reader of this
>> message is not the intended recipient or the employee or agent responsible
>> for delivering it to the intended recipient, you are hereby notified that any
>> examination, use, dissemination, distribution or copying of this
>> communication or any part thereof is strictly prohibited.  If you have
>> received this communication in error, please immediately notify the sender by
>> reply e-mail and destroy this communication.  Thank you.
>>>
>>> --
>>>
>>> Frank Swarbrick
>>> Applications Architect - Mainframe Applications Development
>>> FirstBank Data Corporation - Lakewood, CO  USA
>>> P: 303-235-1403
>>>
>>> ----------------------------------------------------------------------
>>> 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
>>>
>>
>> ----------------------------------------------------------------------
>> 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
>
>
> --
>
> Frank Swarbrick
> Applications Architect - Mainframe Applications Development
> FirstBank Data Corporation - Lakewood, CO  USA
> P: 303-235-1403
>
> ----------------------------------------------------------------------
> 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
>

----------------------------------------------------------------------
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