MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Store procedure read/write to flat file

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
Disco_Stu
Beginner


Joined: 04 Feb 2003
Posts: 19
Topics: 7

PostPosted: Thu Jul 22, 2004 1:30 pm    Post subject: Store procedure read/write to flat file Reply with quote

I am wondering if it is possible to read/write to a flat file from a DB2 stored procedure? I read something that implied its possible. But it didnt go into any details about how.

My experience has been writing cobol programs that interact with flat files via JCL. Now i am working on some ASP code that will call store procedures to update tables. It is my goal to be able to use this stored procedure to create a trigger file. Previously we have written the triggers to a table, then accessed the table in our processing. I would like to skip the table part and write directly to a file.

If someone has some sources or could point me in the right direction, that would be appreciated. thanks.
Back to top
View user's profile Send private message
SureshKumar
Intermediate


Joined: 23 Jan 2003
Posts: 211
Topics: 21

PostPosted: Thu Jul 22, 2004 1:48 pm    Post subject: Reply with quote

Disco_Stu,
You can write to a file. This is not recommeneded. Assuming the SP's are running under WLM, the file needs to defined to the WLM JCL. Remember many TCB's can excute under 1 WLM address Space, therefore having QSAM files is not possible, you may need VSAM's. Then again, the VSAM needs to be dellocated to be used by a another batch job. If we are looking at an online system 24/7, it could lead to resource contentions. Go with insert to DB2 or use MQ. File processing thru SP is not a good idea. Thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group