Provided it's a PROGRAM (and not a FUNCTION or a SUBROUTINE), the following steps are required.
Get to the UNIX prompt.
Ensure that your $DSHOME environment variable is set to the correct value (the location of the DSEngine directory).
Execute the $DSHOME/dsenv shell script.
Change directory to the DataStage project in which you have created the program.
Assuming that you have created a Type 19 file called BASIC.PROGS and created a program called MYPROG within it you can compile the program with the command:
Code: Select all
$DSHOME/bin/dssh "BASIC BASIC.PROGS MYPROG"
Catalog the program using the command:
Code: Select all
$DSHOME/bin/dssh "CATALOG BASIC.PROGS MYPROG LOCAL"
Execute the program (which cataloging has converted into a DataStage command) using the command:
Another way to execute the program is:
Code: Select all
$DSHOME/bin/dssh "RUN BASIC.PROGS MYPROG"
You should really have no reason to do any of this. I provide the steps since you seem so insistent. Please do not try to re-invent any of the programs already part of DataStage; it is a waste of your and your employer's time.
The answer for FUNCTIONs and SUBROUTINEs I gave earlier; they can not be run from the command prompt, either the UNIX command prompt or the
dssh command prompt.
There are several options on each of these commands, which you can discover in the
DataStage BASIC manual.
Finally let me reiterate that this is NOT something you really want to do.
I now consider this topic closed, and will not respond to it again.