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," || ,
":DISCDSN,:DISCDEVT,:DISCSPACE," || ,
":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.