Data Source Parameters

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
palmeal
Participant
Posts: 122
Joined: Thu Oct 14, 2004 7:56 am
Location: Edinburgh, Scotland

Data Source Parameters

Post by palmeal »

I have a file that contains many rows of data. I want to be able to attach to up to 10 Sybase servers and run an identical query based on the values within the file.

I can write some Job Control Language to loop through this file value by value and call a Job Server to execute SQL against a database.

The problem that I have is that I can't see anyway of creating one Job Server that will allow me to specify which Sybase server to connect to by means of parameters.
The Job Server that I have created has an ODBC task where I have duly entered the data source name, username and password on the Stage tab.
Is there anyway that I can provide these values at runtime so that I don't have to have a Job Server for every Sybase server that I wish to run this identical query against ?

If there is then does DataStage provide any form of encryption for the use of passwords ?
richdhan
Premium Member
Premium Member
Posts: 364
Joined: Thu Feb 12, 2004 12:24 am

Post by richdhan »

Hi,

You can use the following calls in your job control to set the parameters at run-time.

DSSetParam (hjob, "DSN", "DSN value")
DSSetParam (hjob, "UID", "UID value")
DSSetParam (hjob, "PWD", "PWD value")

HTH
Rich
palmeal
Participant
Posts: 122
Joined: Thu Oct 14, 2004 7:56 am
Location: Edinburgh, Scotland

Post by palmeal »

Thanks for that Rich.

I have added the code that you supplied into the Job Control Language
but wonder what values I put into the Data Source Name etc in the Stage tab on the ODBC link in the Job Server.
richdhan
Premium Member
Premium Member
Posts: 364
Joined: Thu Feb 12, 2004 12:24 am

Post by richdhan »

Hi,

Before you go any further I suggest that you go through the server documentation available.

As far as parameters is concerned, pls check coredevgde.pdf page no 160. It gives info on how to set parameters for server jobs.

HTH
Rich
palmeal
Participant
Posts: 122
Joined: Thu Oct 14, 2004 7:56 am
Location: Edinburgh, Scotland

Post by palmeal »

Thanks Rich - thanks for the pointers - now working a treat.
Post Reply