Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: Using Cobol - Inserting same data into a DB2 table every every week/until a condition is met
"Raya" <lakshmiraya@gmail.com> wrote in message
news:1176101204.010928.134730@y66g2000hsf.googlegroups.com...
> Hi,
> 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/
> denied.
>
> Any help would be highly appreciated.
>
> Thanks,
> Raya.
>

I would use a stored procedure and a trigger (DB2 supports both).

Put a trigger on the table so that when COBOL does the insert, a task is
automatically scheduled to do it again in 7 days.

This is achieved by a stored procedure call to ADMIN_TASK_SCHEDULE.

This system stored procedure takes a number of parameters, some of which are
when you want it to start and stop, or under what conditions.

You can use ADMIN_TASK_SCHEDULE to cause a set of JCL,  a JCL procedure or a
stored DB procedure to be run, and have the results returned (RC if it is
JCL; SQLCODE if it is a stored procedure) and written to a log or whatever
at the time it is activated.

Have a look at the IBM documentation for DB2 version 9.1 for z/OS.

Pete.



Report this thread to moderator Post Follow-up to this message
Old Post
Pete Dashwood
04-09-07 11:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:22 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.