Re: Using Cobol - Inserting same data into a DB2 table every every week/until a condition is met
- From: "Pete Dashwood" <dashwood@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 11 Apr 2007 03:57:47 +1200
"yukongal" <yukongal@xxxxxxxxxxxxx> wrote in message
I have a requirement as follows:
I have a COBOL+DB2 program that inserts data into a DB2 table when >an
order is placed. Now, The same data should be inserted into the same
table after every 7 days until a condition is met. This means I need
to insert same data after every 7 days until the order is approved/
Any help would be highly appreciated.
I see this and my mind is saying 'DUPLICATES!'.
Eileen, I think the OP wasn't clear about the key structure. It would be
fair to assume (although dangerous, as assumptions usually are...) that as
the periodicity of this data is important, the key probably contains a date
and/or time. Given a seven day separation, duplicates will not occur.
Why in the world would they want the same data inserted everyday unless
there is some sort of purging done each night.
They don't. Have another look at the statement of the problem... :-)
From a business standpoint I don't see the value of this - but for
homework I suppose it's possible :)
I don't think it's homework (it is too stupid to be contrived.... :-) much
more likely to be real world... ); even if it is, it won't do any harm for
someone to have a look at how DB2 deals with triggers and stored
So - look up INSERT, PRIMARY KEYS, CURRENT TIMESTAMP and DUPLICATES -
happy -806 (if memory serves).
Good advice... and probably helpful :-)
- Prev by Date: Re: powercobol compile all directory projects
- Next by Date: Re: powercobol compile all directory projects
- Previous by thread: Re: Using Cobol - Inserting same data into a DB2 table every every week/until a condition is met
- Next by thread: powercobol compile all directory projects