Solved

Why am I getting this DB2 error? "DSNU034I    DSNUBCKB - DATA SET TYPE INVALID FOR DDNAME SYSTEMPL"

Posted on 2013-01-06
9
1,314 Views
Last Modified: 2013-01-09
Hello all,

I am running a job to copy DB2 tablespaces on the mainframe and it is failing on the template dataset definition for the COPY request. Can someone help descibe what I am missing and how to fix this. The error and JCL is shown below:

Error:

DSNU050I    DSNUGUTC -  COPY LIST OG1LIST COPYDDN(SYSTEMPL) PARALLEL(4) SHRLEVEL REFERENCE
DSNU427I    DSNUBBID - OBJECTS WILL BE PROCESSED IN PARALLEL,
                      NUMBER OF OBJECTS = 4

DSNU034I    DSNUBCKB - DATA SET TYPE INVALID FOR DDNAME SYSTEMPL
DSNU012I    DSNUGBAC - UTILITY EXECUTION TERMINATED, HIGHEST RETURN CODE=8

JCL:

//OG1TESTF JOB 05274,'ONGARD,BN-53',NOTIFY=&SYSUID,                     JOB02435
//      CLASS=H,MSGCLASS=X,REGION=0M
//*
//SETVAR SET SSNODE=DBO1,DBOI=P1,DBOO=D2,TRK=OG1,LOADIR=TEST,
//           NODELIB=OGADM3,PDBNAME='OG1DD%1',PNAME='OG1SC%'
//       SET VAL1='WHERE DBNAME LIKE ',
//           VAL2='OG1DDEV1',
//           LISTDEF='D1OG1LD'
//*
//JOBLIB   DD  DISP=SHR,DSN=SYS2.DB2.&LOADIR..SDSNEXIT
//         DD  DISP=SHR,DSN=SYS2.DB2.&LOADIR..SDSNLOAD
//         DD  DISP=SHR,DSN=SYS2.DB2.&LOADIR..RUNLIB.LOAD
//MYLIBS1  JCLLIB  ORDER=OG1.&NODELIB..PROCLIB
//*
//****************************************************
//*  DELETE PREVIOUS WORK FILES FOR DATABASE & TRACK *
//****************************************************
//*
//UTL100U EXEC PGM=IEFBR14                                              00058100
//DD01    DD DSN=OG1.F&SSNODE..&TRK..RUNDYNAM,                          00058200
//           DISP=(MOD,DELETE,DELETE),                                  00058300
//           UNIT=SYSDA,SPACE=(TRK,(1,1),RLSE),
//           DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)
//*        DD DSN=OG1.F&SSNODE..&TRK..OSCR.OG1LIST.TSPACEO,             00058400
//*           DISP=(MOD,DELETE,DELETE),                                 00058500
//*           UNIT=SYSDA,SPACE=(TRK,(1,1),RLSE),
//*           DCB=(RECFM=FB,LRECL=80,BLKSIZE=2400)
//*        DD DSN=OG1.F&SSNODE..&TRK..TBSPACE.DATA,                     00058400
//*           DISP=(MOD,DELETE,DELETE),                                 00058500
//*           UNIT=SYSDA,SPACE=(TRK,(1,1),RLSE),
//*           DCB=(RECFM=FB,LRECL=80,BLKSIZE=2400)
//*        DD DSN=OG1.F&SSNODE..&TRK..TRACK.DATA1,                      00058400
//*           DISP=(MOD,DELETE,DELETE),                                 00058500
//*           UNIT=SYSDA,SPACE=(TRK,(1,1),RLSE),
//*           DCB=(RECFM=FB,LRECL=80,BLKSIZE=2400)
//*
//***********************************************************
//* QUIESCE LISTDEF, COPY TABLESPACE LISTDEF TABLESPACES    *
//* NOTE: (1) ONGARD MAY DECIDE TO ADD RECOVERYDDN HERE     *
//*       THIS WILL NECESSARILY REDUCE THE NEED TO          *
//*       MAINTAIN OFFSITE RECOVERY DB2 RECOVERY JOBS.      *
//***********************************************************
//UTL1025U  EXEC DBO1PROC,UID='OG1DDEV1.QUIESC1',
// UTPROC='',SYSTEM='DBO1',COND=(4,LT)
//LISTDD  DD DISP=SHR,DSN=OG1.&NODELIB..PARMLIB(&LISTDEF)
//SYSTEMPL DD *                                                         00330000
  TEMPLATE TEMPLDD                                                      00340000
           DSN   OG3.F&SSNNODE..&DB..&TS..P&PART..D&DATE,               00350000
           DISP=(MOD,CATLG,CATLG),UNIT=SYSDA,                           00380000
           SPACE=(TRK,(1,1),RLSE),AVGREC=M,                             00390000
           DATACLAS=LINEAR,DCB=(ADP1.GDGMODEL)                          00400000
//SYSIN DD *
//      DD DISP=SHR,DSN=OG1.&NODELIB..PARMLIB(OG1COPY)

PARMLIB Control statement:

OPTIONS LISTDEFDD(LISTDD) TEMPLATEDD(SYSTEMPL)                          
QUIESCE LIST OG1LIST                                                    
COPY    LIST OG1LIST COPYDDN(SYSTEMPL) PARALLEL(4) SHRLEVEL REFERENCE  

Any help to show what I am missing and how to fix it will be highly appreciated.

Thanks
0
Comment
Question by:Enyinnaya
9 Comments
 
LVL 24

Accepted Solution

by:
Tomas Helgi Johannsson earned 250 total points
ID: 38750192
Hi!

Make sure you define correct datafile type that DB2 can read.
Also I find the template a litle bit strange. It should probably look something like this

           TEMPLATE TEMPLDD                                                      
           DSN(OG3.F&SSNNODE..&DB..&TS..P&PART..D&DATE)            
           DISP=(MOD,CATLG,CATLG),UNIT=SYSDA                          
           SPACE=(TRK,(1,1),RLSE),AVGREC=M                            
           DATACLAS=LINEAR,DCB=(ADP1.GDGMODEL)          

I would look at the dataclas and the avgrec. It looks strange to me.

http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=%2Fcom.ibm.db2z10.doc.msgs%2Fsrc%2Ftpc%2Fdsnu034i.htm

Regards,
    Tomas Helgi
0
 
LVL 57

Assisted Solution

by:giltjr
giltjr earned 125 total points
ID: 38750652
To follow up on TomasHelgi's post.  I believe that the dataset name should be enclosed within quotes within the parens:

  DSN('OG3.F&SSNNODE..&DB..&TS..P&PART..D&DATE')    

I'm also not so sure you really want to use MOD as the disposition. Instead of using a GDG you seem to be using DATE to create a unique file by DB/TS/PART.  This is fine IF you can guarantee that this job would only ever be run once on the same day.

If you were to run this more than once on the same day, you would add to the end of the file, which means you could end up wit duplicate data in the file.

You are also using CATLG as the abnormal termination disp.  Which means if the copy were to abend, you would still catalog the file.
0
 
LVL 37

Assisted Solution

by:momi_sabag
momi_sabag earned 125 total points
ID: 38751510
try to change
//SYSTEMPL DD *
to
//SYSTEMPL DD *,DISP=(NEW,DELETE)
0
 
LVL 57

Expert Comment

by:giltjr
ID: 38752238
Unless something has change, DISP is ignored for "DD *".
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:Enyinnaya
ID: 38753297
Hello momi_sabag and giltjr,

Thank you guys for your continued interest on this thread. I made some changes keeping in mind the suggestions that I got from your posts. While there is definite progress, I am having some errors whith the TEMPLATE dataset name. Please see the cleanup JCL and the error that I am having now...with the template variables:

"D&DATE or &DT and "T&TIME or &TI".

Do you guys see anything I am missing with regards to the dataset name?

ERROR MSG:

DSNU000I    DSNUGUTC - OUTPUT START FOR UTILITY, UTILID = OG1DDEV1.QUIESC1
DSNU1044I   DSNUGTIS - PROCESSING SYSIN AS EBCDIC

DSNU050I    DSNUGUTC -  OPTIONS LISTDEFDD(LISTDD) TEMPLATEDD(SYSTEMPL)
DSNU1035I   DSNUILDR - OPTIONS STATEMENT PROCESSED SUCCESSFULLY

DSNU050I    DSNUGUTC -  COPY LIST OG1LIST COPYDDN(TEMPLDD) PARALLEL(4) SHRLEVEL REFERENCE
DSNU1044I   DSNUGTIS - PROCESSING LISTDD AS EBCDIC
DSNU427I    DSNUBBID - OBJECTS WILL BE PROCESSED IN PARALLEL,
                      NUMBER OF OBJECTS = 4

DSNU1044I   DSNUGTIS - PROCESSING SYSTEMPL AS EBCDIC
DSNU1032I   DSNUGTDS - INVALID QUALIFIER T&HOUR IN TEMPLATE TEMPLDD
DSNU012I    DSNUGBAC - UTILITY EXECUTION TERMINATED, HIGHEST RETURN CODE=8

JCL:

//OG1TESTF JOB 05274,'ONGARD,BN-53',NOTIFY=&SYSUID,                    
//      CLASS=H,MSGCLASS=X,REGION=0M
//*
//SETVAR SET SSNODE=DBO1,DBOI=P1,DBOO=D2,TRK=OG1,LOADIR=TEST,
//           NODELIB=OGADM3,PDBNAME='OG1DDEV1',PNAME='OG1SC%'
//       SET VAL1='WHERE DBNAME LIKE ',
//           VAL2='OG1DDEV1',
//           LISTDEF='D1OG1LD',
//           OGCOPY='OG1COPY'
//*
//JOBLIB   DD  DISP=SHR,DSN=SYS2.DB2.&LOADIR..SDSNEXIT
//         DD  DISP=SHR,DSN=SYS2.DB2.&LOADIR..SDSNLOAD
//         DD  DISP=SHR,DSN=SYS2.DB2.&LOADIR..RUNLIB.LOAD
//MYLIBS1  JCLLIB  ORDER=OG1.&NODELIB..PROCLIB
//*
//****************************************************
//*  DELETE PREVIOUS WORK FILES FOR DATABASE & TRACK *
//****************************************************
//*
//UTL100U EXEC PGM=IEFBR14                                            
//DD01    DD DSN=OG1.F&SSNODE..&TRK..RUNDYNAM,                        
//           DISP=(MOD,DELETE,DELETE),                                  
//           UNIT=SYSDA,SPACE=(TRK,(1,1),RLSE),
//           DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)
//***********************************************************
//* QUIESCE LISTDEF, COPY TABLESPACE LISTDEF TABLESPACES    *
//* NOTE: (1) ONGARD MAY DECIDE TO ADD RECOVERYDDN HERE     *
//*       THIS WILL NECESSARILY REDUCE THE NEED TO          *
//*       MAINTAIN OFFSITE RECOVERY DB2 RECOVERY JOBS.      *
//***********************************************************
 
//UTL1025U  EXEC DBO1PROC,UID='OG1DDEV1.QUIESC1',
// UTPROC='',SYSTEM='DBO1',COND=(4,LT)
//LISTDD  DD DISP=SHR,DSN=OG1.&NODELIB..PARMLIB(&LISTDEF)
 
LISTDEF OG1LIST  INCLUDE TABLESPACE OG1DDEV1.*
 
//SYSTEMPL DD *                                                        

  TEMPLATE TEMPLDD                                                      

           DSN('OG3.F&SSID..OSCD.&DB..&TS..D&DT..T&TI')                

           DISP(NEW,CATLG,DELETE)                                      

           GDGLIMIT(3)
 
           UNIT SYSDA                                                  
 
//SYSIN DD *
//      DD DISP=SHR,DSN=OG1.&NODELIB..PARMLIB(&OGCOPY)
 
OPTIONS LISTDEFDD(LISTDD) TEMPLATEDD(SYSTEMPL)
COPY    LIST OG1LIST COPYDDN(TEMPLDD) PARALLEL(4) SHRLEVEL REFERENCE

Thanks
0
 
LVL 57

Expert Comment

by:giltjr
ID: 38753397
Do you have some other input to this?  The error you are getting is:

DSNU1032I   DSNUGTDS - INVALID QUALIFIER T&HOUR IN TEMPLATE TEMPLDD

Because &HOUR is not a valid variable.  However I don't see where you have specified T&HOUR anyplace.
0
 
LVL 57

Expert Comment

by:giltjr
ID: 38753401
Oh wait, just found &HOUR is supposed to be valid, but I still don't see where you have it specified.

I did noticed that you have specified GDGLIMIT(3), but you don't have a GDG name specified for the template.

You would need to add (+1) to the end of the name and then make sure that with all of the other variables and the GooVoo number that the file name does not exceed 44 characters.
0
 

Author Comment

by:Enyinnaya
ID: 38761982
giltjr,

I am not really using &HOUR, I am using TIME or &TT as shown above. I have been able to solve my problem and yes, I will add the (+1).

For all your help, I thank you very much.
0
 

Author Closing Comment

by:Enyinnaya
ID: 38761991
Thanks
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

We planned to use NetApp's SnapManager for Exchange (SME) to make three snapshots a day for quick recovery. Additional we planned to use Symantec NetBackup7 to backup to tape media for disaster recovery. We followed the best practice guide from NetA…
The article will include the best Data Recovery Tools along with their Features, Capabilities, and their Download Links. Hope you’ll enjoy it and will choose the one as required by you.
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now