Hi All,
I'm really facing serious issues while confronting with the file writing limitations of the DataStage routines. Actaully i want to write a transform routine for Routine Activity which will be called in Sequencer and will append the user supplied information through arguments to the existing information file.
I couldn't find any specific way to go about appending the contents to the data file through routine. The WRITESEQ statement overwrites the existing file which is not required.!
Any information or help regarding this..?? A million dollar question, Does the routine functionality is really limited in this case?
File Writing Limitations
Moderators: chulett, rschirm, roy
Hemant,
you haven't confronted any file writing limitations in DataStage routines in this case.
When you OPENSEQ a sequential file the file pointer is positioned at the beginning of the file. If you start writing to the file then you are going to overwrite your data and then truncate it when you close the file.
In order to append to a sequential file you first need to position the current file pointer to the end of the file, you do this using the SEEK command which is documented in the DataStage BASIC handbook.
Alternatively (and a route I recommend), you should use the handy routine written by Ray Wurlod and posted here
you haven't confronted any file writing limitations in DataStage routines in this case.
When you OPENSEQ a sequential file the file pointer is positioned at the beginning of the file. If you start writing to the file then you are going to overwrite your data and then truncate it when you close the file.
In order to append to a sequential file you first need to position the current file pointer to the end of the file, you do this using the SEEK command which is documented in the DataStage BASIC handbook.
Alternatively (and a route I recommend), you should use the handy routine written by Ray Wurlod and posted here
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>