How to access an INI file and its value

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
sankar18
Participant
Posts: 34
Joined: Mon Dec 16, 2002 1:18 am

How to access an INI file and its value

Post by sankar18 »

Hi All,

Requirement is like this:

Mail ids will be in INI file.

How to access the INI file and its value from DataStage.
the value has to send to DSSendmail as an input value.

Thanks in Advance,
T Sankar
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

In a Routine (or in a job control routine):
open the INI file with OpenSeq
read it a line at a time with ReadSeq
when done, close it with CloseSeq

A useful construct is the Boolean context of ReadSeq, which you can use to exit your loop reading the file. For example:
Loop
While ReadSeq Line From filevariable
* process the line, e.g. build list of addresses
* for sendmail
Repeat
Post Reply