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

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
EnyinnayaAsked:
Who is Participating?
 
Tomas Helgi JohannssonConnect With a Mentor Commented:
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
 
giltjrConnect With a Mentor Commented:
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
 
momi_sabagConnect With a Mentor Commented:
try to change
//SYSTEMPL DD *
to
//SYSTEMPL DD *,DISP=(NEW,DELETE)
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
giltjrCommented:
Unless something has change, DISP is ignored for "DD *".
0
 
EnyinnayaAuthor Commented:
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
 
giltjrCommented:
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
 
giltjrCommented:
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
 
EnyinnayaAuthor Commented:
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
 
EnyinnayaAuthor Commented:
Thanks
0
All Courses

From novice to tech pro — start learning today.