Page 1 of 1

Reading a file through a routine

Posted: Thu Feb 19, 2009 6:15 am
by poorna.ds
I need to read a file through a routine. Can anyone help me out with this?

Thanks In Advance

Posted: Thu Feb 19, 2009 6:22 am
by Sainath.Srinivasan
Why and What do you want to achieve ?

Posted: Thu Feb 19, 2009 6:23 am
by Sainath.Srinivasan
Why and What do you want to achieve ?

Posted: Thu Feb 19, 2009 6:47 am
by poorna.ds
Sainath.Srinivasan wrote:Why and What do you want to achieve ?
We are trying to do the auditing of the jobs basically.The file which is to be read contains all the jobs source name, target name, and their respective input and output link name. Through a dummy job I need to call a before Job routine which would read this file. Could you help me on this?

Posted: Thu Feb 19, 2009 8:24 am
by chulett
Why do you "need" to do this in a routine? Why not a simple Server job instead? :?

Posted: Thu Feb 19, 2009 10:11 am
by velagapudi_k
How is the file generated? You got to give more information on the file layout etc. As Criag said, a job should be fine I guess.

Posted: Thu Feb 19, 2009 10:49 am
by ArndW
Craig has already recommend the preferred method, using DataStage to read and work on this file.
There are a number of DS/Basic routine calls which let you open, close, read records or even read bytes from sequential files; but they involve a lot of programming and testing unless you have done this sort of thing before; so why not let the built-in DataStage functionality take care of it instead of trying to re-invent the wheel?