dssetparm apt_config_file

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

wuruima
Participant
Posts: 65
Joined: Mon Nov 04, 2013 10:15 pm

dssetparm apt_config_file

Post by wuruima »

so sad I search in the forum so long time but cannot find any post.

I use a routine to run the DS job, now I want to specify the different APT fot different job, eg. file1.apt for job1, file2.apt for job2.

I hope I can set this by DSSETPARM like the user defined params but failed.

paramerr = DSSetParam (job2 , "$APT_CONFIG_FILE", '/sysp/DataStage81/InformationServer/Server/Configurations/file1.apt')

It still uses the default apt to run.

do I use the incorrect function to run?
wuruimao
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Did you check 'paramerr' after the function call? What is 'job2'? It needs to be a handle to a job, not an actual job name, obtained using DSAttachJob.
-craig

"You can never have too many knives" -- Logan Nine Fingers
wuruima
Participant
Posts: 65
Joined: Mon Nov 04, 2013 10:15 pm

Post by wuruima »

get it.. i will check the paramerr
wuruimao
wuruima
Participant
Posts: 65
Joined: Mon Nov 04, 2013 10:15 pm

Post by wuruima »

code=-3 [ParamName does not reference a known parameter of the job]
hi chulett,
this is the error it shows, could u please advise how to fix ?
wuruimao
wuruima
Participant
Posts: 65
Joined: Mon Nov 04, 2013 10:15 pm

Post by wuruima »

it's not correct to set environment variable user ds set parm
I found this in the forum.
but I want the job to run for different apt. e.g. the routine starts job1 using apt1, starts job2 using apt2. what should i do ?
wuruimao
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Did you actually declare the APT_CONFIG_FILE parameter explicitly in your job?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yes, it is both possible and you are using the correct function. As noted, you need to declare it as a job parameter in the job (this is one of several that should be in every job) to allow it to be overridden on a run-by-run basis as needed.

I also found this 'remark' in the latest documentation as shown here.

Remarks

The job specified by JobHandle must be locked, using DSLockJob, before the DSSetParam function is called.

That's a new one on me as I don't remember ever having to do that or even seeing that function before. :?

:idea: Please use the Reply to topic button to reply unless you really need to quote something... which is hardly ever the case. Saves me having to clean up all the over-quoting. Thanks.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I believe that the DSLockJob() is when using the c interface, I can't see it mentioned for the BASIC calls documentation (11.3) and it isn't even defined - I get a compile error when I try to use it.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

True... sorry, didn't realize I'd stumbled into the C API documentation. :(
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You seem to have missed calls to DSAttachJob() and DSDetachJob().
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
wuruima
Participant
Posts: 65
Joined: Mon Nov 04, 2013 10:15 pm

Post by wuruima »

i called DSAttachJob. And also add system variable in the parallel job.
But failed on set parm , saying no this parm.
wuruimao
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Are you 100% certain that you defined this parameter in the job (case sensitive)? Could you also post your DSAttachJob() call?
wuruima
Participant
Posts: 65
Joined: Mon Nov 04, 2013 10:15 pm

Post by wuruima »

yes.
define the system parm in the parallel job property;
DSAttachJob to get the parallel job handler;
DSSetParm to set parm to this system parm.

when run job, 'no this parm' error.
wuruimao
wuruima
Participant
Posts: 65
Joined: Mon Nov 04, 2013 10:15 pm

Post by wuruima »

btw, i set many parms to the parallel job. others are all okay, the system parm fail
wuruimao
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I'm not sure why this is popping into my head but could you try not including the $ in your DSSetParam call? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply