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

Creation of a file dynamically in a Cobol Program


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
praveena avaluru

New User


Joined: 29 Sep 2010
Posts: 9
Location: bangalore

PostPosted: Mon Oct 25, 2010 4:58 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Mon Oct 25, 2010 6:47 pm
Reply with quote

For First Question:

www.ibmmainframes.com/viewtopic.php?t=45980&highlight=dynamic
www.ibmmainframes.com/viewtopic.php?t=41691&highlight=dynamic
www.ibmmainframes.com/viewtopic.php?t=41691&highlight=dynamic
ibmmainframes.com/about8030.html
ibmmainframes.com/about38331.html
ibmmainframes.com/about46689.html

For Second Question: What kind of performance Issue are you facing?

Third Question is an interesting question. And from COBOL stand point of view - it should be doable, though, I've never tried it. But the rather burning question I'd like to ask is -- why do you want to do this?
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 Oct 25, 2010 7:55 pm
Reply with quote

Hello,

How does creating a file dynamically relate to a temporary table. . . icon_confused.gif

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
View user's profile Send private message
praveena avaluru

New User


Joined: 29 Sep 2010
Posts: 9
Location: bangalore

PostPosted: Tue Oct 26, 2010 12:12 am
Reply with quote

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 icon_rolleyes.gif .. (This program is called online hence dynamic) .

PS : Also if any other solutions are there it will be gr8 icon_biggrin.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Oct 26, 2010 12:28 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Oct 26, 2010 1:01 am
Reply with quote

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
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 Replace each space in cobol string wi... COBOL Programming 3
Search our Forums:

Back to Top