View previous topic :: View next topic |
Author |
Message |
Disco_Stu Beginner
Joined: 04 Feb 2003 Posts: 19 Topics: 7
|
Posted: Thu Jul 22, 2004 1:30 pm Post subject: Store procedure read/write to flat file |
|
|
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 |
|
 |
SureshKumar Intermediate
Joined: 23 Jan 2003 Posts: 211 Topics: 21
|
Posted: Thu Jul 22, 2004 1:48 pm Post subject: |
|
|
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 |
|
 |
|
|