dynamic directory in actual execute command via parameter

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
haisen
Participant
Posts: 11
Joined: Sun May 11, 2008 1:42 am

dynamic directory in actual execute command via parameter

Post by haisen »

Requirement:
1) Run unix shell script via Execute Command to get text file's data for downstream processing.
2) The directory of the unix script will be based on the value in parameter set due to UAT & PRD environment.
3) Value retrieve will be used to read another file or to use it as a where clause to extract record from DB and load directly to another DB.

Execute Command Stage:
Command --> /app/scripts/#env#/#mart_id#_get_param.sh #other_param1# hardcoded_param2
Last edited by haisen on Fri May 30, 2008 4:45 am, edited 1 time in total.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Umm, DataStage is pretty good at reading text files in jobs and using parameters for dynamic values.
bkumar103
Participant
Posts: 214
Joined: Wed Jul 25, 2007 2:29 am
Location: Chennai

Post by bkumar103 »

Could you please be more specific. what is this file contains?
Birendra
OddJob
Participant
Posts: 163
Joined: Tue Feb 28, 2006 5:00 am
Location: Sheffield, UK

Post by OddJob »

Unfortunately you can't use Job Parameters in the Command field of an Execute Command Sequence stage.

Instead, put your command line in the Parameters field, where you can use params. You could use exec as your command e.g. in your case:

Command: exec
Parameters: /app/scripts/#env#/#mart_id#_get_param.sh #other_param1# hardcoded_param2

Instead of exec you should be able to use sh or ksh etc, but on my system I get a permissions problem so settled on exec to get it working.
Post Reply