IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need rexx tool to unload table data form image copy to file


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
maruthi143

New User


Joined: 17 Jun 2009
Posts: 7
Location: chennai

PostPosted: Wed Jun 17, 2009 12:30 pm
Reply with quote

HI folks,

Please help it on this

I need a rexx tool to unload data from image copy to a flat file.No need to contact Database tables for this.I have the jcl for it.My project is to unload data from production and load in test regions.
around 61 partitioned tables are present in my application.We prepared around 200 jobs each partition have one image copy.

My tool present in such a way that when i enter db2 subsystem,image copy input file,output file it automatically create jcl in my PDS and submits jcl.

For reference please find the sample jcl we used for it

//NBKOS9P1 JOB (0000),'KTCUAS01',
// REGION=0M,MSGCLASS=V,CLASS=0,NOTIFY=&SYSUID
//JOBLIB DD DISP=SHR,DSN=CJ1P.KTC0.LOADLIB
// DD DISP=SHR,DSN=DZ4T.DB2.DSNLOAD
//DELETE EXEC UCC11
//**********************************************************************
//* THIS JOB WILL UNLOAD THE IMAGE COPY AND WRITES THE UNLOAD TO A TAPE
//**********************************************************************
//DB2UTL#1 EXEC PGM=DSNUTILB,REGION=0M,
// PARM='DZ4T,TEMP'
//STEPLIB DD DSN=DZ4T.DB2.DSNLOAD,DISP=SHR
// DD DSN=DZ4T.DB2.DSNEXIT,DISP=SHR
//*
//SYSPRINT DD SYSOUT=*
//UTPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSPUNCH DD DSN=KTCT.KTC3406D.KTC06018.SASSET.SYSPUNCH,
// DISP=(,CATLG,CATLG),UNIT=SYSDA,
// SPACE=(CYL,(10,10),RLSE)
//SYSREC00 DD DSN=KTCT.KTC3406D.KTC06018.SASSET.UNLOAD1,
// DISP=(NEW,CATLG,DELETE),
// UNIT=CARTA00,
// LABEL=(1,SL,RETPD=060),
// VOL=(,RETAIN,,60)
//*
//SYSIN DD *
UNLOAD TABLESPACE KTC3406D.KTC06018 FROMCOPYDDN COPYDD
UNLDDN SYSREC00
PUNCHDDN SYSPUNCH
EBCDIC SHRLEVEL CHANGE ISOLATION UR
FROM TABLE KTC34.S_ASSET
HEADER NONE
//*
//COPYDD DD DSN=KTCT.TST.KTC3406D.KTC06018.TX.SASET01,DISP=SHR

we each time changed the image copy file name ,db2 subsystem,table name,output file name(sysrec),table layout file name(syspunch).Since i am new to rexx Please help it on this elaboratly
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Wed Jun 17, 2009 1:52 pm
Reply with quote

Hi maruthi143,

1.You can make use of VPUT and VGET in PROFILE and then get them
from profile to your rexx program
2.Pass the values to the rexx program
3.Build the job by using QUEUE each time such a way that the job gets all
the needed input db2 subsystem,table name,output file name
(sysrec),table layout file name(syspunch).
4.For more information on VPUT,VGET,QUEUE search this forum
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Jun 17, 2009 2:03 pm
Reply with quote

What is it exactly that you need help with ?

premkrishnan
Quote:
3.Build the job by using QUEUE each time such a way that the job gets all
the needed input db2 subsystem,table name,output file name
(sysrec),table layout file name(syspunch).

I would have thought that an ISPF skeleton would be so much easier to use with so many variables at play here.
Back to top
View user's profile Send private message
maruthi143

New User


Joined: 17 Jun 2009
Posts: 7
Location: chennai

PostPosted: Wed Jun 17, 2009 2:20 pm
Reply with quote

thnks for the quick update Can u proviode me the a sample rexx code on this. I will cross verify with my code changes i used the same commands u mentioned.Thanks in advance..icon_smile.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Jun 17, 2009 2:31 pm
Reply with quote

Please DO NOT ask for code without at least showing us what you have already coded and the problems encountered.

This is a Help forum, and not a Do it for me forum.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Wed Jun 17, 2009 2:33 pm
Reply with quote

expat,

If db2 subsystem,table name,output file name are just the input fields then usage of queues would be better please let me know your comments on the same?

Thanks.
Back to top
View user's profile Send private message
maruthi143

New User


Joined: 17 Jun 2009
Posts: 7
Location: chennai

PostPosted: Wed Jun 17, 2009 2:38 pm
Reply with quote

Its confidential and its internal to bank.Thats y i given a jcl with different names but in rexx not possible rite?icon_smile.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Jun 17, 2009 2:49 pm
Reply with quote

I prefer to use skeletons because .......
(a) I do not believe that coding and queueing JCL is a healthy operation.
(b) Using skeletons you can easily edit the JCL before submission.
- possible with queue but more work involved
(c) Using skeletons you can easily bypass the submit process.
- possible with queue but more work involved
(d) Skeletons can be used in many applications with no code changes required.
- A rexx with enclosed coding needs to be replicated or modularised.
(e) Using a skeleton, if changes are required, one change does all
- If replicated REXX are used, it's oh so easy to miss one and cause problems.
(f) Probably a lot more reasons that others can think of too
Back to top
View user's profile Send private message
maruthi143

New User


Joined: 17 Jun 2009
Posts: 7
Location: chennai

PostPosted: Wed Jun 17, 2009 2:55 pm
Reply with quote

Thanks for the update.I will try with skelton jcls

thanks in advance
Back to top
View user's profile Send private message
vijay kandhukuri

New User


Joined: 09 Nov 2008
Posts: 1
Location: Hyd

PostPosted: Sun Jul 26, 2009 2:38 pm
Reply with quote

hi,

Please let me know whether your requireent is correct.
"You need to design a rexx tool such that it will unload the data from production region tables and the load the data into the testing region tables'

If above requirement is correct, then follow these steps

1. Design two seperate JCLs.
Frist JCL: First JCL that will have unload job to copy the data from production region tables to the datasets. Thjis JCL must be executed in the Production region.
Secon JCL: Second JCL having the job to copy data from the datasets of first JCL to the testing region tables.this job must be executed in the testing region.

2. You submit the First JCL with the help of REXX code
3. In the first JCL, you also include one more step, that will an internal card job/jcl to invoke the secnd JCL.

--> Better design a COBOL program in the second JCL to copy the data from datasets into the testing region tables.
--> Using REXx, u can modify the queries before submitting the first JCL.

3.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top