Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Need rexx tool to unload table data form image copy to file
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

Moderator


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

PostPosted: Wed Jun 17, 2009 1:52 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed Jun 17, 2009 2:03 pm    Post subject:
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    Post subject: Reply to: Need rexx tool to unload table data form image cop
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: 8593
Location: Back in jolly old England

PostPosted: Wed Jun 17, 2009 2:31 pm    Post subject:
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

Moderator


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

PostPosted: Wed Jun 17, 2009 2:33 pm    Post subject:
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    Post subject: Reply to: Need rexx tool to unload table data form image cop
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: 8593
Location: Back in jolly old England

PostPosted: Wed Jun 17, 2009 2:49 pm    Post subject:
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    Post subject: Reply to: Need rexx tool to unload table data form image cop
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us