Cannot execute RUNSTATS



IBM's flagship relational database management system

Cannot execute RUNSTATS

Postby lfraga » Thu Jan 21, 2021 5:39 pm

Hi all,
I'm trying to collect statistics for a table in a DB2 for z/OS 11

//IBMUSERA JOB(ACCOUNT),'NAME'
//*
//*
//*
//UTIL EXEC DSNUPROC,SYSTEM=DBBG,UID='TEMP',UTPROC=''
//*
//**********************************************
//*
//*  GENERATING JCL FOR THE RUNSTATS UTILITY
//*  DATE:  01/20/2021         TIME: 20:32:41
//*
//**********************************************
//*
//DSNUPROC.SYSIN    DD  *
RUNSTATS TABLESPACE(DSN00220.TESTTABLE) TABLE(TESTTABLE) COLUMN(ALL)
//


This JCL was created with the DB2 utility util but I'm obtaining the following error:
// IEFC612I PROCEDURE DSNUPROC WAS NOT FOUND


I'm an absolute newbie in this, I know the existence of mainframes since 2 days ago and reading and watching guides to get to this point, but I'm stuck now.

Some help would be appreciated.
lfraga
 
Posts: 3
Joined: Thu Jan 21, 2021 5:16 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Cannot execute RUNSTATS

Postby lfraga » Thu Jan 21, 2021 6:32 pm

I also tried with

//STEPONE  EXEC PGM=DSNUTILB,PARM='DBBG,TEMPUID'
//*
//SYSIN    DD  *
RUNSTATS TABLESPACE(DSN00220.TESTTABLE) TABLE(TESTTABLE) COLUMN(ALL)
//


but then I'm running into

// CSV003I REQUESTED MODULE DSNUTILB NOT FOUND


What for what I read
https://www.ibm.com/support/knowledgece ... l2ims.html
it seems that I'm missing some JOBLIB or STEPLIB like:
//STEPLIB  DD DSN=UDBV710.SDSNLOAD,DISP=SHR


the thing is that it tells about loading prefix.SDSNLOAD and I have no idea how to guess what prefix is. And how/where to get the correct one for my system

sorry if I'm not making too much sense...
lfraga
 
Posts: 3
Joined: Thu Jan 21, 2021 5:16 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Cannot execute RUNSTATS

Postby enrico-sorichetti » Thu Jan 21, 2021 7:11 pm

since nobody on the forum belongs to Your organisation
asking here how to resolve prefix.SDSNLOAD to the name used in Your installation
is just a waste of time for everybody

ask Your support
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort

These users thanked the author enrico-sorichetti for the post:
lfraga (Fri Jan 22, 2021 12:10 am)
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Cannot execute RUNSTATS

Postby lfraga » Fri Jan 22, 2021 12:09 am

Thx for the response.

It finally works!! This is how it was solved:

I found the prefix by going to Utilities -> Dslist and then searching by Dsname Level = *.SDSNLOAD (I think you may have to search by *.*.SDSNLOAD instead or *.*.*.SDSNLOAD) but his worked for me.

Then struggled these last 6 hours with more problems and tests to end with this program that finllay works:

//RUNSTATS EXEC PGM=DSNUTILB,REGION=2M,COND=(4,LT),                  
// PARM='%SID%,%UID%,'                                              
//STEPLIB DD DSN=%prefix%.SDSNLOAD,DISP=SHR                            
//SYSPRINT DD SYSOUT=*                                              
//UTPRINT DD SYSOUT=*                                                
//*SYSUDUMP DD SYSOUT=*                                              
//SYSIN DD *                                                        
RUNSTATS TABLESPACE DSN00000.TESTTABLE TABLE(TESTTABLE) COLUMN(ALL)
/*        


where %SID% is your db2 sid, %UID% the user and %prefix% was found as explained above.

I hope this saves a few days to a newbie like me, welcome to 1972
lfraga
 
Posts: 3
Joined: Thu Jan 21, 2021 5:16 pm
Has thanked: 1 time
Been thanked: 0 time


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post