Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Could you please help me writing a cobol/db2 program

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

New User


Joined: 23 Feb 2007
Posts: 7
Location: USA

PostPosted: Tue Jun 17, 2008 1:23 am    Post subject: Could you please help me writing a cobol/db2 program
Reply with quote

There are two tables A, B and flat file.

Table A has three colums. unique index on Num_col and Code_col and got 99 records

Num_col, Code_col and Days_col
10 01 007 days
10 02 010 days
.
.
10 99 015 days


Table B has two cols and got 1 million accounts

Account Days_col
1 7
2 10
3 7
...

1 million accounts

By mistake udpated table B's days_col with table A Days_col but it should update with code_col. Now i got a flag file with accounts, Days cols..
My requirement is that i need to read flat file and get account then read the table B's Days_col and then get corresponding record in table A but table A Days_col is not a index cols but it has unique records.

I know onc way can load table A in array and read table B record and search it in Array but i don't know how effiecnet. Is there any other we can code above requiremnt using DB2 query on A table.

raju
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Jun 17, 2008 1:53 am    Post subject:
Reply with quote

Hello,

You could talk with your dba(s) about adding an index for the tableA days_col to facilitate the repair.

Once the data is correct, the index could be dropped (or even kept, if it would be useful for other joins).

Make sure a backup is taken before doing the repair icon_wink.gif
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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Accessing CICS tran with map from JCL... navdeepaggarwal CICS 5 Tue Oct 03, 2017 6:15 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us