Error during running server routine for setting the path

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
ag_ram
Premium Member
Premium Member
Posts: 524
Joined: Wed Feb 28, 2007 3:51 am

Error during running server routine for setting the path

Post by ag_ram »

In the routine I am check the record counts in dataset. If there is no record i am returning 1 else I am returning 2.

After running my routine I am getting this error.

Message to be logged is...
> dsrecords /appl/infoserver/Server/Projects/ILOS_Online_Shopping/datasets/OS_vanavailability_001_ex_TMS.DS_rejstores.ds:exec(): 0509-036 Cannot load program /appl/infoserver/Server/PXEngine/bin/dsrecords because of the following errors:
> 0509-150 Dependent module liborchaix3.a(libtemp.o) could not be loaded.
> 0509-022 Cannot load module liborchaix3.a(libtemp.o).
> 0509-026 System error: A file or directory in the path name does not exist.
>

I feel I need to set some environment variable in the routine before I call dsrecords in DSEecuete inside the routine.

Please suggest me how to set these environment variable. I have tried as we generally do in shell script. But that is not working.

currently my routine code carries as below.

APT_CONFIG_FILE = '/appl/infoserver/Server/Configurations/2node.apt'
APT_ORCHHOME = '/appl/infoserver/Server/PXEngine'
PATH = '%PATH%' : '/appl/infoserver/Server/PXEngine/bin'
ORCHBIN = APT_ORCHHOME : '/bin'
LIBPATH = '/appl/infoserver/Server/PXEngine/lib'

I assume this is not working as expected. Please anyone post how to set these variables in the routine.


regards
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I guess you posted here because it's a server routine, even though you are in a parallel job. The correct syntax for setting environment variables requires no space either side of the "=" character.

In any case you are not setting environment variables, you are setting DataStage BASIC variables. To set environment variables you need to be in the (operating system) environment, and to use a mechanism that can successfully export the environment variables for use by subsequent and child processes.

By the time you run a before-job subroutine, job parameter values have already been set so that, even if your routine successfully changes the values of the environment variables, the job parameters still retain the values that they had when the job was initiated.

One of the absolute rules in DataStage is that there is no legal mechanism for changing the value of a job parameter once the job is running.

So it appears that you need to find a different approach.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ag_ram
Premium Member
Premium Member
Posts: 524
Joined: Wed Feb 28, 2007 3:51 am

Post by ag_ram »

Thanks.

Just an info...this routine is one of the job activity in seqeucner.

No need of setting environment variables. You are right.

But when I open the routine in designer and tried to run that error was thrown.

But when i ran the sequencer, routine was succesdful. Anyway problem is resolved but just need to know Cant we test the routine in designer?

thanks Ray once again.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Alas, no. The Test bed you get in Designer* does not have the fully-featured "wrapper" that a job sequence (= job control routine) has.

* For those on versions earlier than 8.0, read Manager here. In version 8 all Manager functionality has been subsumed into Designer and there is no more Manager client.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply