Reading a file through a routine

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
poorna.ds
Participant
Posts: 18
Joined: Sun Jun 22, 2008 3:07 am
Location: Mumbai

Reading a file through a routine

Post by poorna.ds »

I need to read a file through a routine. Can anyone help me out with this?

Thanks In Advance
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Why and What do you want to achieve ?
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Why and What do you want to achieve ?
poorna.ds
Participant
Posts: 18
Joined: Sun Jun 22, 2008 3:07 am
Location: Mumbai

Post 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?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Why do you "need" to do this in a routine? Why not a simple Server job instead? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
velagapudi_k
Premium Member
Premium Member
Posts: 142
Joined: Mon Jun 27, 2005 5:31 pm
Location: Atlanta GA

Post 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.
Venkat Velagapudi
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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?
Post Reply