| |
|
If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
|
 |

06-17-10, 13:50
|
|
Registered User
|
|
Join Date: Jun 2010
Posts: 3
|
|
Help Running Db2 utility using rexx
|
|
hi i am trying to run DB2 utility in REXX using the below code
Uid = "REPAIR32"
UTSTMT = "REPAIR SET TABLESPACE("DBNAME"."TSNAME")" ,
"NOCOPYPEND"
RetCode = 0
UTILITY = "REPAIR"
Address DSNREXX "EXECSQL" ,
"CALL SYSPROC.DSNUTILS(:UID,:RESTART," || ,
":UTSTMT," || ,
":RETCODE," || ,
":UTILITY," || ,
":RECDSN,:RECDEVT,:RECSPACE," || ,
" ISCDSN, ISCDEVT, ISCSPACE," || ,
":PNCHDSN,:PNCHDEVT,:PNCHSPACE," || ,
":COPYDSN1,:COPYDEVT1,:COPYSPACE1," || ,
":COPYDSN2,:COPYDEVT2,:COPYSPACE2," || ,
":RCPYDSN1,:RCPYDEVT1,:RCPYSPACE1," || ,
":RCPYDSN2,:RCPYDEVT2,:RCPYSPACE2," || ,
":WORKDSN1,:WORKDEVT1,:WORKSPACE1," || ,
":WORKDSN2,:WORKDEVT2,:WORKSPACE2," || ,
":MAPDSN,:MAPDEVT,:MAPSPACE," || ,
":ERRDSN,:ERRDEVT,:ERRSPACE," || ,
":FILTRDSN,:FILTRDEVT,:FILTRSPACE)"
But I am getting below Authorization Issue:
DSNU000I DSNUGUTC - OUTPUT START FOR UTILITY, UTILID = REPAIR32
DSNU1044I DSNUGTIS - PROCESSING SYSIN AS EBCDIC
DSNU050I DSNUGUTC - REPAIR
DSNU650I -DB2D DSNUCBRS - SET TABLESPACE(XXXXXX.SSSSSSS) NOCOPYPEND
DSNU060I -DB2D DSNUGMAP - USER UUUUU NOT AUTHORIZED FOR REPAIR UTILITY ON DA
TABASE XXXXXX
DSNU012I DSNUGBAC - UTILITY EXECUTION TERMINATED, HIGHEST RETURN CODE=12
But if i Run the same Utility using DSNUTILB, I am able to run the UTIL
//REPAIR EXEC PGM= DSNUTILB,PARM='DB2A,REPAR23I'
Output:
DSNU000I DSNUGUTC - OUTPUT START FOR UTILITY, UTILID = REPAR23I
DSNU1044I DSNUGTIS - PROCESSING SYSIN AS EBCDIC
DSNU050I DSNUGUTC - REPAIR
DSNU650I -DB2D DSNUCBRS - SET TABLESPACE XXXXXX.SSSSSS NOCOPYPEND
DSNU651I -DB2D DSNUCBRS - SET NOCOPYPEND OPERATION SUCCESSFUL
DSNU010I DSNUGBAC - UTILITY EXECUTION COMPLETE, HIGHEST RETURN CODE=0
Can anyone help me why is it so , because i got the REXX code from IBM site and i had gone through the code , but not able to find why the authorization issue occurs. pls let me know if you need any more details on this.
|
|

06-17-10, 14:22
|
|
Registered User
|
|
Join Date: Dec 2007
Location: Richmond, VA
Posts: 782
|
|
Is the batch job running with the same TSO userid? I do not mean the same TSO user submitted, I mean there is not a USER parm in the JCL for it run as another user.
Dave
|
|

06-18-10, 04:59
|
|
Registered User
|
|
Join Date: Jun 2010
Posts: 3
|
|
|
|
The same USER submitted the JOB in the same TSO .
Even the BATCH JOB was submitted with the CLASS that points to the same TSO region in which i am running the REXX .
|
|

06-25-10, 08:09
|
|
Registered User
|
|
Join Date: Dec 2004
Location: Italy
Posts: 32
|
|
Have you checked if the routine sysproc.dsnutils has the proper grants?
The DSNTIJSG job creates, binds and grants the sysproc.dsnutils routine
|
|

06-25-10, 12:53
|
|
Registered User
|
|
Join Date: Jun 2010
Posts: 3
|
|
Hi...
I am not sure if i have access for the utlity.... But the below message says i don't have access for REPAIR UTILITY.
DSNU060I -DB2D DSNUGMAP - USER UUUUU NOT AUTHORIZED FOR REPAIR UTILITY ON DATABASE XXXXXX
Further Details on the JOB used. Any small help on this will be of great help.
In the below Program in the link below , I changed below values and ran the job
Uid = "REPAIR32"
UTSTMT = "REPAIR SET TABLESPACE("DBNAME"."TSNAME")" ,
"NOCOPYPEND"
RetCode = 0
UTILITY = "REPAIR"
http://www.ibm.com/developerworks/ex...8/CLDSNUTL.txt
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|