View previous topic :: View next topic
|
Author |
Message |
praveena avaluru
New User
Joined: 29 Sep 2010 Posts: 9 Location: bangalore
|
|
|
|
Hi
Kindly help me in understanding the concept of creating files Dynamically in COBOL Program
I have a requirement where I create a temporay table and store and manupilate the data in a Store Procedure. But this is giving a Performance Issues.
Is it possible to create the files dynamically in an SP.
Thanks
Praveena |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
How does creating a file dynamically relate to a temporary table. . .
Keep in mind that anything can be made to be more difficult and cause performance issues. . .
If you explain what you are actually trying to do (the business function), someone may have a suggestion. |
|
Back to top |
|
|
praveena avaluru
New User
Joined: 29 Sep 2010 Posts: 9 Location: bangalore
|
|
|
|
Thank u for ur responses.
I have a requirement to fetch values from various tables. and the count is not constant. Hence i used temporary table in stored procedure and fetched all the values and populated in temp table and opened the cursor.
But this SP is hit many times like 5000- 10000 times. Hence 5000 times the SP is creating and dropping the table.Hence the total time take by the outer task is multiplied.
I thought with a fixed copybook i will create a file in the place of temp file.
If it is possible .. (This program is called online hence dynamic) .
PS : Also if any other solutions are there it will be gr8 |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
Hence 5000 times the SP is creating and dropping the table |
for no other reason than the above statistic,
the design should be redone. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
and the count is not constant. |
Why does this matter? I would expect the "count" to be different for different tables. . .
Quote: |
Hence 5000 times the SP is creating and dropping the table |
To open and close a file so many times may perform even worse. . .
To repeat:
Quote: |
If you explain what you are actually trying to do (the business function), someone may have a suggestion. |
So, what really needs to be accomplished? The answer is NOT to read some rows and write some output. . . |
|
Back to top |
|
|
|