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

Comparing File & DB2 table fields & deleting common


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Mon May 19, 2008 11:49 am
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon May 19, 2008 12:02 pm
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

Moderator Emeritus


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

PostPosted: Mon May 19, 2008 12:04 pm
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon May 19, 2008 12:24 pm
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

Superior Member


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

PostPosted: Mon May 19, 2008 1:27 pm
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
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
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top