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
 

 

Comparing File & DB2 table fields & deleting common

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
paramita.barman

New User


Joined: 12 Oct 2006
Posts: 18

PostPosted: Mon May 19, 2008 11:41 am    Post subject: Comparing File & DB2 table fields & deleting common
Reply with quote

Hi,

The requirement is to compare a particular field of a file against a field in a table, then delete the common values from the DB2 table. Writing a COBOL-DB2 program is not convenient in this case.

Can you please suggest any other alternative solution for the same?

Thanks in advance.
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: Mon May 19, 2008 11:49 am    Post subject:
Reply with quote

Hello,

Quote:
Writing a COBOL-DB2 program is not convenient in this case
Convenient? It is downright trivial. I believe the entire program logic would be:
1. read file.
2. read appropriate database info
3. delete the ones that need to be deleted.

How would you prefer to do this (keeping in mind that this is the COBOL part of th forum)?
Back to top
View user's profile Send private message
paramita.barman

New User


Joined: 12 Oct 2006
Posts: 18

PostPosted: Mon May 19, 2008 11:56 am    Post subject:
Reply with quote

Hi Dick,

Yes...... actually I have already thought of the solution you have suggested. But then we need to bind the program. There are complications in our system which does not allow us to do so.

Could you please suggest a different solution for the same? (Like writing an Easytrieve program or a Sort for that matter).

Thanks for your reply.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10257
Location: italy

PostPosted: Mon May 19, 2008 12:02 pm    Post subject: Reply to: Comparing File & DB2 table fields & deleti
Reply with quote

Quote:
.... Writing a COBOL-DB2 program is not convenient in this case.
Can you please suggest any other alternative solution for the same?


write a DB2-COBOL program, faster and simpler

/rant on
I think that discarding a solution because of ...
unconveniences, feelings, impressions, ...
without having evaluated alternatives,
or even worse without having alternatives to evaluate
is just &any_derogatory_adjective_You_like
/rant off
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: Mon May 19, 2008 12:04 pm    Post subject:
Reply with quote

Hello,

Quote:
Like writing an Easytrieve program
Yes, the same process could be implemented using Easytrieve. There are db2 examples in the Easytrieve documentation.

If your organization is licensed to use Easytrieve, the manuals can be downloaded for free from CA support.
Back to top
View user's profile Send private message
paramita.barman

New User


Joined: 12 Oct 2006
Posts: 18

PostPosted: Mon May 19, 2008 12:19 pm    Post subject: Compare a particular field of a file against a field
Reply with quote

Hi,

The requirement is to compare a particular field of a file against a field in a table, then delete the common values from the DB2 table. Writing a COBOL-DB2 program is not convenient in this case.

Can you please suggest any other alternative solution for the same?

Thanks in advance.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10257
Location: italy

PostPosted: Mon May 19, 2008 12:24 pm    Post subject: Reply to: COMPARING FILE & DB2 TABLE FIELDS & DELETI
Reply with quote

You already asked the same question in the cobol forum
why ask again? exactly with the same words... to get the same reply ??

or, You simply want somebody to write the code for You???

as a politician said:
to think evil is a sin, but most of the times You are right
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon May 19, 2008 1:27 pm    Post subject:
Reply with quote

Hi,

May be if you "unload" the table to a QSAM (flat file) & "upload" after process is done (deletion of similar records), might help.
Back to top
View user's profile Send private message
the_gautam

Active User


Joined: 05 Jun 2005
Posts: 165
Location: Bangalore

PostPosted: Tue May 20, 2008 10:17 am    Post subject:
Reply with quote

Quote:
Writing a COBOL-DB2 program is not convenient in this case.

can you please tell us the difficulties in writing such a program?
Back to top
View user's profile Send private message
ermanisharora

New User


Joined: 10 Apr 2007
Posts: 7
Location: Good-gaon

PostPosted: Wed May 21, 2008 1:21 pm    Post subject:
Reply with quote

paramita.barman wrote:


Could you please suggest a different solution for the same? (Like writing an Easytrieve program or a Sort for that matter).

Thanks for your reply.
Quote:


If there is a problem in binding, even the easytrieve would not work then.... As mentioned by Anuj, you can go for unload,sort and upload approach then
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 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
No new posts Sum Fields ballaswaroop DFSORT/ICETOOL 4 Tue May 02, 2017 11:07 am


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