Solved

Can I load several DB2 Tables using LISTDEF and a TEMPLATE? If so, can I see some examples(s)?

Posted on 2013-01-29
6
1,438 Views
Last Modified: 2013-03-05
Hi all,
I have unload (using LISTDEF & TEMPLATing) a DB2 database of several tablespace/tables and associated SYSPUNCH cards. I will like to use LISTDEF and a Template to load the tables data into my test environment.
How can I do this? Is there other ways to do this? Any example(s) to guide me how to code the JCL, etc etc

I will appreciate any and all suggestions?

Thanks
0
Comment
Question by:Enyinnaya
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 37

Accepted Solution

by:
momi_sabag earned 500 total points
ID: 38834116
sure you can do that
you just use all your syspunch files as input
you can do something like this

//SYSIN DD *
//          DD DISP=SHR,DSN=SYSPUNCH1
//          DD DISP=SHR,DSN=SYSPUNCH2
//          DD DISP=SHR,DSN=SYSPUNCH3
...
0
 

Author Comment

by:Enyinnaya
ID: 38834996
momi_sabag,

Thanks for yur respons. I have not done this before so a little more detailed example will be heavenly. For example, how to code the template the LOAD process uses, how to code the LISTDEFDD command for the LOAD and any other pointers that you think I should be aware of.

If I could get IEBGENER or any of the DFHSMS utilities like IEBUPTE or IEBCOPY to copy all the SYSPUNCH into a single file, I knw of a way to do what I need to do.

Any comments and recommendation will be welcomed.

Thanks
0
 

Author Comment

by:Enyinnaya
ID: 38837853
moni_sabq,
 
Let me clarify what I am trying to accomplish.
Your suggestion willl work but I don't want to have to hard code tablespace name every so often. I can create a SYSPUNCH dataset using the template whether it is a GDG based dataset or a simple sequential file. I can dynamically create a file (lets call it FILEA) containing all the SYSPUNCH file names that I generated from doing an UNLOAD. THe whole idea is not to have to hard code tablespace name each and everytime a tablespace is added or dropped. I simply read my SYSTABLESPACE, extract the tablespace I am after, build according to the SYSPUNCH naming convention used during UNLOAD, feed
this FILEA to SYSUT1 such as the following:

//S01OF99 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD DSN=FILEA,DISP=OLD
//SYSUT2 DD DSN=SOMENAME,DISP=(,CATLG)

I want IEBGENER to read FILEA and copy the actual SYSPUNCH contoll statements of each name registered in FILEA to to 1 single file named in SYSUT2. In order words merge all files. The contents of FILEA is just a list of files to copy into SYSUT2 and the structure will look like this:

FILEA:

DD DISP=SHR,DSN=GO1.FDEV1.OSCR.D1UNL.GO1SCAM1.PUNCH
DD DISP=SHR,DSN=GO1.FDEV1.OSCR.D1UNL.GO1SCJR1.PUNCH
DD DISP=SHR,DSN=GO1.FDEV1.OSCR.D1UNL.GO1SDNF1.PUNCH
DD DISP=SHR,DSN=GO1.FDEV1.OSCR.D1UNL.GO1SGAJ1.PUNCH
DD DISP=SHR,DSN=GO1.FDEV1.OSCR.D1UNL.GO1SGCT1.PUNCH
DD DISP=SHR,DSN=GO1.FDEV1.OSCR.D1UNL.GO1SMSR1.PUNCH
DD DISP=SHR,DSN=GO1.FDEV1.OSCR.D1UNL.GO1SNAK1.PUNCH
DD DISP=SHR,DSN=GO1.FDEV1.OSCR.D1UNL.GO1SOFC1.PUNCH
DD DISP=SHR,DSN=GO1.FDEV1.OSCR.D1UNL.GO1SGO11.PUNCH

When I tried this method, IEBGENER errors-out with this message:

DATA SET UTILITY - GENERATE      
DD DISP=SHR,DSN=GO1.FDEV1.OSCR.D1UNL.GO1SCAM1.PUNCH
IEB336I       INVALID COMMAND IN COL. 07      
DD DISP=SHR,DSN=GO1.FDEV1.OSCR.D1UNL.GO1SCJR1.PUNCH
IEB336I       INVALID COMMAND IN COL. 07      
DD DISP=SHR,DSN=GO1.FDEV1.OSCR.D1UNL.GO1SDNF1.PUNCH
IEB336I       INVALID COMMAND IN COL. 07
DD DISP=SHR,DSN=GO1.FDEV1.OSCR.D1UNL.GO1SGAJ1.PUNCH

What do I need to correct the error and make this work.
0
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
LVL 37

Expert Comment

by:momi_sabag
ID: 38837909
it seems that you can't use a template for sysin so you will have to either copy all the syspunch files into a single file, or concatenate them one to the other like i wrote in the previous comment
0
 
LVL 37

Expert Comment

by:momi_sabag
ID: 38837912
when you do the unload, don't use a gdg file
have a single syspunch file and your life will be simpler
0
 

Author Closing Comment

by:Enyinnaya
ID: 38953680
At tis time, this appears to be way to go
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Best web interface for online storage 3 110
backup program 6 72
Backup fail due to VSS errors. 4 169
iSeries DB2 SQL - Request user input 12 77
How to fix error ""Failed to validate the vCentre certificate. Either install or verify the certificate by using the vSphere Data Protection Configuration utility" when you are trying to connect to VDP instance from Vcenter.
VM backup deduplication is a method of reducing the amount of storage space needed to save VM backups. In most organizations, VMs contain many duplicate copies of data, such as VMs deployed from the same template, VMs with the same OS, or VMs that h…
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…
This tutorial will walk an individual through the process of installing of Data Protection Manager on a server running Windows Server 2012 R2, including the prerequisites. Microsoft .Net 3.5 is required. To install this feature, go to Server Manager…

756 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