Page 1 of 1

Changing the current directory

Posted: Fri Aug 20, 2004 10:50 am
by hrthomson
We would like to implement XML source files to our project, but are running into one point of contention.

DataStage will only find the schema if the full URL or directory path is given in the xsi:schemaLocation= statement or the xsd file resides in the current project directory.

This causes environment migration issues and we would like to avoid hard coding the path if at all possible.

Has anyone run into this issue, and if so did you find a solution?

Thanks in advance

Heather

Posted: Fri Aug 20, 2004 6:01 pm
by ray.wurlod
There's a subroutine called !MAKE.PATHNAME in DataStage BASIC that will construct a fully qualified pathname. If you leave the first argument as a zero-length string, it will return the fully-qualified pathname of its second argument. (And if you leave both empty, it returns the fully-qualified pathname of your current working directory.)

Code: Select all

Call !MAKE.PATHNAME(Arg1, Arg2, Result, Status)
Status reports whether or not Result exists, only if Arg1 and Arg2 are both non-empty. Arg2 must be a relative pathname.