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 a JCl to extract the KEY value from the DB2 table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
ibmmainframesyntel

Active User


Joined: 26 Feb 2007
Posts: 126
Location: Chennai

PostPosted: Wed Aug 13, 2008 11:02 am    Post subject: Need a JCl to extract the KEY value from the DB2 table
Reply with quote

Hi ,

I have to extract only the primary key of th DB2 table into flat file.

Using that extracted primary key,have to extract two more fields from another table in the flat file.

Is that possible thr JCL?

Example


Table - E.ECCCPRT
Code:


I_part
-------
001
002
.
.
.
100





Table - E.ESPMAST
Code:


I_part   VOLUME_Demand    part_Cost
-------    -------------------    ------------
001        1                          1
002        2                          2
.
.
.
100        4                          4
.
.
.

900        2                          2





My output file should contain
Code:




001        1                          1
002        2                          2
.
.
.
100        4                          4
Back to top
View user's profile Send private message

Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Wed Aug 13, 2008 11:13 am    Post subject: Reply to: Need a JCl to extract the KEY value from the DB2
Reply with quote

Hi,

Quote:
I have to extract only the primary key of th DB2 table into flat file.


Have you unloaded the tables into a flat files? Post the attributes of the files and their key positions.

Quote:
Is that possible thr JCL?


Yes, You can use the SPLICE operator of DFSORT for this requirement. Post the files if you want a working JCL for your requirement.
Back to top
View user's profile Send private message
ibmmainframesyntel

Active User


Joined: 26 Feb 2007
Posts: 126
Location: Chennai

PostPosted: Wed Aug 13, 2008 12:02 pm    Post subject: Reply to: Need a JCl to extract the KEY value from the DB2
Reply with quote

No, i have extract data from the DB2 table...
In this case,input is from DB2 table.......
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 Aug 13, 2008 12:18 pm    Post subject: Re: Reply to: Need a JCl to extract the KEY value from the
Reply with quote

ibmmainframesyntel wrote:
No, i have extract data from the DB2 table...
In this case,input is from DB2 table.......

So what is your question / problem ?

Moved to DB2
Back to top
View user's profile Send private message
ibmmainframesyntel

Active User


Joined: 26 Feb 2007
Posts: 126
Location: Chennai

PostPosted: Wed Aug 13, 2008 3:01 pm    Post subject:
Reply with quote

Need a JCl for the above requirements..

Is that possible?
Back to top
View user's profile Send private message
ibmmainframesyntel

Active User


Joined: 26 Feb 2007
Posts: 126
Location: Chennai

PostPosted: Mon Aug 18, 2008 12:13 pm    Post subject:
Reply with quote

I got it....which is in 'JCL' topic....
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 -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts Join of more than one table dibyendumandal11111 DB2 6 Mon Feb 13, 2017 11:36 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm


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