Real basic DB2 question for Batch Job

Lizette Koehler

Real basic DB2 question for Batch Job
I need to run a batch job to do a GRANT DELETE on Table to ID



It has been so long I am not sure how to set up the JCL



Where would a GRANT command run? DSNTEP2? DSNIAUL?? Other??





Thanks



Lizette



Fred Edgar

Real basic DB2 question for Batch Job
(in response to Lizette Koehler)
I would use DSNTIAD. 


Sent from Yahoo Mail for iPhone


On Wednesday, May 13, 2020, 16:14, Lizette Koehler <[login to unmask email]> wrote:

<!--#yiv4063493609 _filtered {} _filtered {}#yiv4063493609 #yiv4063493609 p.yiv4063493609MsoNormal, #yiv4063493609 li.yiv4063493609MsoNormal, #yiv4063493609 div.yiv4063493609MsoNormal {margin:0in;margin-bottom:.0001pt;font-size:11.0pt;font-family:"Calibri", sans-serif;}#yiv4063493609 span.yiv4063493609EmailStyle17 {font-family:"Calibri", sans-serif;color:windowtext;}#yiv4063493609 .yiv4063493609MsoChpDefault {font-family:"Calibri", sans-serif;} _filtered {}#yiv4063493609 div.yiv4063493609WordSection1 {}-->
I need to run a batch job to do a GRANT DELETE on Table to ID

 

It has been so long I am not sure how to set up the JCL

 

Where would a GRANT command run?  DSNTEP2?  DSNIAUL??   Other??

 

 

Thanks

 

Lizette

 

Site Links: View post online   View mailing list online   Start new thread via email   Unsubscribe from this mailing list   Manage your subscription  

This email has been sent to: [login to unmask email]
Try BCV5, the BCV5 Masking Tool, & XDM a rapid Refresh/Clone/TDM Suite for Db2 z & distributed.
DBARS -Audit,record,& block Db2 accesses to sensitive data real-time, NO audit trace or log required
http://www.ESAIGroup.com/IDUG



Use of this email content is governed by the terms of service at:
http://www.idug.org/p/cm/ld/fid=2



James Campbell

Real basic DB2 question for Batch Job
(in response to Fred Edgar)
Any of DSNTIAD, DSNTEP2, DSNTEP4, DSNTIUL, SPUFI will work. As will QMF, Db2
Administration Tool (main option 2), CA Db2 Administration Tools (main menu ISQL
command). And I'm sure others.

Main gotya is that you might have to
SET CURRENT SQLID = '<appropriate id>'
if you don't have the inherit authority to make the grant.

// EXEC PGM=IKJEFT01,PARM='DSN SYS(ssid)'
//STEPLIB DD DISP=SHR,DSN=your runlib.load
// DD DISP=SHR,DSN=your SDSNEXIT
// DD DISP=SHR,DSN=your SDSNLOAD
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTSIN DD *
RUN PROG(DSNTyyyy) PLAN(as appropriate)
END
//SYSIN DD *
SET CURRENT SQLID ='?????';
GRANT DELETE ON ????? TO ????;
/*

Most of my JCL has the DSN command as a parameter on the EXEC statement. That way I
use a symbolic parameter in it and the the STEPLIB data set names.

You might like to look in your NEW.SDSNSAMP
DSNTEJ1 - for examples of DSNTIAD
DSNTEJ1L - for examples of DSNTEP2 and TEP4
DSNTEJ2A - if you really want to try DSNTIAUL

The thing you have to remember about those jobs is that the plan names are customised for
the version (DSNTIA12 etc). Most sites I know (and I certainly do this) is create plan names
to match the program names - so the default plan name (i.e. which matches the program
name) will work - so the PLAN(name) option can be omitted.

James Campbell

On 13 May 2020 at 21:32, Fred Edgar wrote:

> I would use DSNTIAD. 
>
>
> Sent from Yahoo Mail for iPhone
>
>
> On Wednesday, May 13, 2020, 16:14, Lizette Koehler <[login to unmask email]> wrote:
>
> <!--#yiv4063493609 _filtered {} _filtered {}#yiv4063493609 #yiv4063493609 p.yiv4063493609MsoNormal, #yiv4063493609 li.yiv4063493609MsoNormal, #yiv4063493609 div.yiv4063493609MsoNormal {margin:0in;margin-bottom:.0001pt;font-size:11.0pt;font-family:"Calibri", sans-serif;}#yiv4063493609 span.yiv4063493609EmailStyle17 {font-family:"Calibri", sans-serif;color:windowtext;}#yiv4063493609 .yiv4063493609MsoChpDefault {font-family:"Calibri", sans-serif;} _filtered {}#yiv4063493609 div.yiv4063493609WordSection1 {}-->
> I need to run a batch job to do a GRANT DELETE on Table to ID
>
>  
>
> It has been so long I am not sure how to set up the JCL
>
>  
>
> Where would a GRANT command run?  DSNTEP2?  DSNIAUL??   Other??
>
>  
>
>  
>
> Thanks
>
>  
>
> Lizette
>
>  

--
This email has been checked for viruses by AVG.
https://www.avg.com

Lance Jackson

Real basic DB2 question for Batch Job
(in response to Lizette Koehler)
Lizette,



Here's JCL for DSNTEP2 (preferred):



//DSNTEP2 EXEC PGM=IKJEFT1B,PARM='DSN SYS(&SSID)'


//STEPLIB DD DSN=&SSID..&NODE..SDSNLOAD,DISP=SHR


// DD DSN=&SSID..&NODE..RUNLIB.LOAD,DISP=SHR


// DD DSN=CEE.SCEERUN,DISP=SHR


//SYSTSPRT DD DUMMY


//*SYSTSPRT DD SYSOUT=*


//SYSPRINT DD SYSOUT=*


//SYSUDUMP DD DUMMY


//SYSTSIN DD *

RUN PROGRAM(DSNTEP2) PLAN(DSNTEP2) PARMS('/ALIGN(LHS)')


END

//SYSIN DD DUMMY




I hope this helps.



Regards,

Lance J.



From: Lizette Koehler <[login to unmask email]>
Sent: Wednesday, May 13, 2020 17:14
To: [login to unmask email]
Subject: [DB2-L] - Real basic DB2 question for Batch Job



I need to run a batch job to do a GRANT DELETE on Table to ID



It has been so long I am not sure how to set up the JCL



Where would a GRANT command run? DSNTEP2? DSNIAUL?? Other??





Thanks



Lizette





-----End Original Message-----

Lizette Koehler

Real basic DB2 question for Batch Job
(in response to Lance Jackson)
Thank you to everyone who replied on and off list. This has been very
helpful



I have "stolen" everyone's examples and placed in a safe place for use.



Of course I will need to remember where that is later





Thanks again



Lizette





From: Lance D. Jackson <[login to unmask email]>
Sent: Thursday, May 14, 2020 5:49 AM
To: [login to unmask email]
Subject: [DB2-L] - RE: Real basic DB2 question for Batch Job



Lizette,



Here's JCL for DSNTEP2 (preferred):



//DSNTEP2 EXEC PGM=IKJEFT1B,PARM='DSN SYS(&SSID)'


//STEPLIB DD DSN=&SSID..&NODE..SDSNLOAD,DISP=SHR


// DD DSN=&SSID..&NODE..RUNLIB.LOAD,DISP=SHR


// DD DSN=CEE.SCEERUN,DISP=SHR


//SYSTSPRT DD DUMMY


//*SYSTSPRT DD SYSOUT=*


//SYSPRINT DD SYSOUT=*


//SYSUDUMP DD DUMMY


//SYSTSIN DD *

RUN PROGRAM(DSNTEP2) PLAN(DSNTEP2) PARMS('/ALIGN(LHS)')


END

//SYSIN DD DUMMY




I hope this helps.



Regards,

Lance J.



From: Lizette Koehler <[login to unmask email] <mailto:[login to unmask email]> >
Sent: Wednesday, May 13, 2020 17:14
To: [login to unmask email] <mailto:[login to unmask email]>
Subject: [DB2-L] - Real basic DB2 question for Batch Job



I need to run a batch job to do a GRANT DELETE on Table to ID



It has been so long I am not sure how to set up the JCL



Where would a GRANT command run? DSNTEP2? DSNIAUL?? Other??





Thanks



Lizette





-----End Original Message-----



-----End Original Message-----