Page 1 of 1

What is the importance of $ character in datastage

Posted: Wed Nov 22, 2006 11:53 pm
by parvathi
Hi,
Can anybody tell the importance of the $ character and where we use it and how we use it.?

Posted: Thu Nov 23, 2006 12:22 am
by chulett
Only when handling money. :wink:

Seriously, you need to put a little more context into this question - where have you seen mention of the $ character? That would help drive an appropriate answer.

Posted: Thu Nov 23, 2006 3:38 am
by parvathi
$INCLUDE DSINCLUDE SAMP.H

this wasthe first line that was given in the routine that i saw.
I want to know the purpouse of this line.

My aim is to run the shellscript through the datastage routine activity

I wanted to knw whether this is required

Posted: Thu Nov 23, 2006 4:04 am
by ArndW
The $ isn't the keyword, "$INCLUDE" is. This is a compile-time switch to include source from another file, in this case "SAMP.H" in "DSINCLUDE". Your code probably will not compile without it. You can read up on $INCLUDE and $INSERT in the DataStage BASIC Programmers Guide

Posted: Thu Nov 23, 2006 4:26 am
by parvathi
where will the "DSINCLUDE" be present ?
can i go and see the file SAMP.H AND its contents because i don't what was written in it

Posted: Thu Nov 23, 2006 4:50 am
by ArndW
It so happens that DSINCLUDE is the include file that DataStage uses, it is a subdirectory called "dsinclude" in the project directory. SAMP.H is a file in that directory and you can look at it.

n.b. I think that it is bad practice to put user defined include files into DSINCLUDE as they might be overwritten when upgrading or changing versions.

Posted: Thu Nov 23, 2006 10:01 am
by ray.wurlod
SAMP.H is unlikely to be a shell script. The routine that contains the $INCLUDE command is definitely not a shell script - it's a DataStage routine.

You can log in to your server, cd to the project directory, cd to the DSINCLUDE subdirectory, and view SAMP.H there with any text viewer.

Posted: Fri Nov 24, 2006 1:01 am
by parvathi
thanks all i came to know that it is a datastage library file

Posted: Fri Nov 24, 2006 4:12 am
by ArndW
It is a DataStage BASIC header include file; I've never heard the term "library file" used for this. Just keep in mind that this is a user-written header, not one supplied as part of the package.