Author Topic: Verifying DSNUTILS, the DB2 Utilities Stored Procedure on z/OS  (Read 7807 times)

Ed_Arnold

  • Hero Member
  • *****
  • Posts: 1200
    • View Profile
I like this IVP for verifying that DSNUTILS is set up properly and working

See my previous topic on the ODBC IVPs for setting up:

1. ODV733.USER.RUNLIB.LOAD

2. ODV733.PRIVATE.SDSNSAMP(DSNAOINI)



//  JOBCARD
//********************************************************************
//*  Name = DSNTEJ80                                                 
//*                                                                   
//*  Descriptive Name =                                               
//*    DB2 Sample Application                                         
//*    Phase 8 (ODBC)                                                 
//*    Utility Stored Procedure (DSNUTILS) caller using C and ODBC   
//*  Function =                                                     
//*    This JCL prepares and executes DSN8OD1, a sample application
//*    program that demonstrates using ODBC to invoke DSNUTILS, the
//*    DB2 Utilities Stored Procedure.                             
//*                                                                 
//******************************************************************
//* Step  1: Compile DSN8OD1, sample ODBC caller of DSNUTILS 
//*                                                           
//PH080S01 EXEC PGM=CCNDRVR,                                 
//             PARM='/CXX OPTFILE(DD:CCOPTS)'                 
//*TEPLIB  DD  DISP=SHR,DSN=CBC.SCBCCMP                       
//*        DD  DISP=SHR,DSN=CEE.SCEERUN                       
//SYSLIN   DD  DISP=(,PASS),DSN=&&OBJDECK,                   
//             UNIT=VIO,SPACE=(TRK,(1,1),RLSE),               
//             DCB=(RECFM=FB,LRECL=80)                       
//SYSPRINT DD  SYSOUT=*                                       
//SYSOUT   DD  SYSOUT=*                                       
//SYSCPRT  DD  SYSOUT=*                                       
//SYSIN    DD  DISP=SHR,DSN=DSN.DB2VA10.SDSNSAMP(DSN8OD1)     
//CCOPTS   DD  DISP=SHR,DSN=DSN.DB2VA10.PROCLIB(DSNHCPPS)     
//         DD  *                                     
  LIST                                               
  NOMAR                                               
  SOURCE                                             
  LONG                                               
//SYSUT1   DD  UNIT=VIO,SPACE=(32000,(30,30)),       
//             DCB=(RECFM=FB,LRECL=80)               
//SYSUT4   DD  UNIT=VIO,SPACE=(32000,(30,30)),       
//             DCB=(RECFM=FB,LRECL=80)               
//SYSUT5   DD  UNIT=VIO,SPACE=(32000,(30,30)),       
//             DCB=(RECFM=FB,LRECL=3200)             
//SYSUT6   DD  UNIT=VIO,SPACE=(32000,(30,30)),       
//             DCB=(RECFM=FB,LRECL=3200)             
//SYSUT7   DD  UNIT=VIO,SPACE=(32000,(30,30)),       
//             DCB=(RECFM=FB,LRECL=3200)             
//SYSUT8   DD  UNIT=VIO,SPACE=(32000,(30,30)),       
//             DCB=(RECFM=FB,LRECL=3200)             
//SYSUT9   DD  UNIT=VIO,SPACE=(32000,(30,30)),       
//             DCB=(RECFM=VB,LRECL=137)               
//SYSUT10  DD  SYSOUT=*                               
//SYSUT14  DD  UNIT=VIO,SPACE=(32000,(30,30)),       
//             DCB=(RECFM=FB,LRECL=3200)             
//SYSUT15  DD  SYSOUT=*                               
//*                                                               
//* Step  2: Prelink DSN8OD1                                     
//*                                                               
//PH080S02 EXEC PGM=EDCPRLK,COND=(4,LT),                         
//             PARM='MAP,NOER'                                   
//STEPLIB  DD  DISP=SHR,DSN=CEE.SCEERUN                           
//SYSMSGS  DD  DISP=SHR,DSN=CEE.SCEEMSGP(EDCPMSGE)               
//SYSLIB   DD  DISP=SHR,DSN=CEE.SCEECPP                           
//SYSIN    DD  DISP=(OLD,DELETE),DSN=&&OBJDECK                   
//         DD  DISP=SHR,DSN=CBC.SCLBSID(IOSTREAM)                 
//         DD  DISP=SHR,DSN=CBC.SCLBSID(COMPLEX)                 
//         DD  DISP=SHR,DSN=CEE.SCEELIB(C128)                     
//         DD  DISP=SHR,DSN=DSN.DB2VA10.SDSNMACS(DSNAOCLI)       
//SYSMOD   DD  DISP=(,PASS),DSN=&&PLKSET,                         
//             UNIT=VIO,SPACE=(32000,(30,30)),                   
//             DCB=(RECFM=FB,LRECL=80)                           
//SYSDEFSD DD  DUMMY                                             
//SYSOUT   DD  SYSOUT=*                                           
//SYSPRINT DD  SYSOUT=*                                           
//*                                                               
//* Step  3: Link DSN8OD1                                         
//*                                                               
//PH080S03 EXEC PGM=HEWL,COND=(4,LT),                             
//             PARM='AMODE=31,MAP,RENT'                           
//SYSLIB   DD  DISP=SHR,DSN=CEE.SCEELKED                         
//SYSLIN   DD  DISP=(OLD,DELETE),DSN=*.PH080S02.SYSMOD           
//SYSLMOD  DD  DISP=SHR,DSN=ODV733.USER.RUNLIB.LOAD(DSN8OD1)     
//SYSUT1   DD  UNIT=VIO,SPACE=(32000,(30,30))                   
//SYSPRINT DD  SYSOUT=*                                         
//*                                                             
//* Step  4: Run DSN8OD1 (call DSNUTILS)                         
//*                                                             
//PH080S04 EXEC PGM=DSN8OD1,COND=(4,LT),                         
//             PARM='/DB1X'                                     
//STEPLIB  DD  DISP=SHR,DSN=CEE.SCEERUN                         
//         DD  DISP=SHR,DSN=CBC.SCLBDLL                         
//         DD  DISP=SHR,DSN=DSN.DB2VA10.SDSNLOAD                 
//         DD  DISP=SHR,DSN=ODV733.USER.RUNLIB.LOAD             
//DSNAOINI DD  DISP=SHR,DSN=ODV733.PRIVATE.SDSNSAMP(DSNAOINI)   
//SYSOUT   DD  SYSOUT=*                                         
//SYSPRINT DD  SYSOUT=*                                         
//CEEDUMP  DD  SYSOUT=*     


When this runs it starts up a stored procedure...here's a snippet from the SYSLOG:

IWM034I PROCEDURE DB1XWLMU STARTED FOR SUBSYSTEM DB1X
APPLICATION ENVIRONMENT DSNWLMX_UTILS                 
PARAMETERS DB2SSN=DB1X,APPLENV='DSNWLMX_UTILS'       
$HASP100 DB1XWLMU ON STCINRDR                         
$HASP373 DB1XWLMU STARTED                             
IEF403I DB1XWLMU - STARTED - TIME=09.35.09           

I didn't bother customizing the source so I get the following in SYSPRINT, but I don't care that the command isn't correct.

DSNU000I    145 09:35:10.01 DSNUGUTC - OUTPUT START FOR UTILITY, UTILID = DSNTEX
DSNU1044I   145 09:35:10.10 DSNUGTIS - PROCESSING SYSIN AS EBCDIC               
DSNU050I    145 09:35:10.12 DSNUGUTC -  RUNSTATS TABLESPACE DSN8D91A.DSN8S91E PART 3 TABLE(ALL) INDEX(ALL)
DSNU054I  -DB1X 145 09:35:10.12 DSNUGMAP - TABLESPACE 'DSN8D91A.DSN8S91E' NOT FOUND
DSNU605I  -DB1X 145 09:35:10.12 DSNUSVAL - ERROR OCCURRED IN ACCESSING TABLESPACE DSN8D91A.DSN8S91E
DSNU012I    145 09:35:10.16 DSNUGBAC - UTILITY EXECUTION TERMINATED, HIGHEST RETURN CODE=8                                   
#zOS #ODF

Ed_Arnold

  • Hero Member
  • *****
  • Posts: 1200
    • View Profile
Re: Verifying DSNUTILS, the DB2 Utilities Stored Procedure on z/OS
« Reply #1 on: June 12, 2012, 07:57:13 AM »
Just a side note:

When running arsmaint -r on z/OS with CMOD 8.4.1 or above the DSNUTILS stored procedure address space will get started.

For example, this is what's in SYSLOG that I see for DB2 V10 when I run arsmaint -r:

IWM034I PROCEDURE DB1XWLMU STARTED FOR SUBSYSTEM DB1X
APPLICATION ENVIRONMENT DSNWLMX_UTILS               
PARAMETERS DB2SSN=DB1X,APPLENV='DSNWLMX_UTILS'       
$HASP100 DB1XWLMU ON STCINRDR                       
$HASP373 DB1XWLMU STARTED                           
IEF403I DB1XWLMU - STARTED - TIME=15.26.09           
#zOS #ODF

cmodpuser

  • Jr. Member
  • **
  • Posts: 42
    • View Profile
Re: Verifying DSNUTILS, the DB2 Utilities Stored Procedure on z/OS
« Reply #2 on: July 19, 2012, 12:14:59 PM »
Ed,
You mentioned this happens under CMOD 8.4.1 and later. Does it mean arsmaint -r is not supported under CMOD 8.4.0?
I was told by CMOD support that arsmaint -r in 8.4.0 does not work under DB2 V8. We have upgraded DB2 to V10 and arsmaint -r still does not do anything. It runs, produces no error message but does not attempt to the WLM address space that DSNUTILS executes in. Why is arsmaint -r documented in 8.4.0 if it does not work?

Ed_Arnold

  • Hero Member
  • *****
  • Posts: 1200
    • View Profile
Re: Verifying DSNUTILS, the DB2 Utilities Stored Procedure on z/OS
« Reply #3 on: July 23, 2012, 08:18:15 AM »
> Why is arsmaint -r documented in 8.4.0 if it does not work?

Because the documentation got ahead of the implementation of the line item.

In other words, this line item, originally planned for 8.4.0, got pushed back to 8.4.1 for coding, but the doc never got updated (really deleted).

As 8.4.0 is in its last 9 months, I doubt the doc will get updated.

Ed
#zOS #ODF