Troubleshooting
History Of Datastage BAT Script to execute a DataStage Job from Command. DB2 problem determination using db2top utility Must know for an UNIX programmer- Some tips Development/Debug Stage in DataStage 17 Mistakes that ETL Designers make with Very Larg. When to choose Server or Parallel Data stage job. Execute Command Activity in a sequence job using InfoSphere DataStage 8.5 FP2 fails to report the correct results Symptom Jobs containing the Execute Command Activity that executes an example command. I am trying to compile the datastage jobs using the Execute Command stage in datastage 11 or any Routines if possible. My datastage is on Unix machine. So, How can I Compile a datastage job in UNIX fr The UNIX and Linux Forums. Nov 02, 2013 Without doing this, your UNIX commands won’t run on the command prompt. After you have done this then you can use any Datastage command for interacting with the server. The main command To run a job: Using the dsjob command you can start,stop,reset or run.
Use a Sequence job to process a list of files. Add an Execute Command Stage to generate a comma-separated list of files with this command line. Powershell library for Datastage; This entry was posted in Code, Sequential File Handling and tagged Loop, Sequence.
Problem
Execute Command Activity in a sequence job using InfoSphere DataStage 8.5 FP2 fails to report the correct results
Symptom
Jobs containing the Execute Command Activity that executes an example command below.
cd /home/dsadm; ls -1atr *file* | head -1
Where the directory /home/dsadm contains a file named file.txt
This should return the result as follows:
file.txt
However, the following result is observed:
file.t********t
cd /home/dsadm; ls -1atr *file* | head -1
Where the directory /home/dsadm contains a file named file.txt
This should return the result as follows:
file.txt
However, the following result is observed:
file.t********t
Resolving The Problem
Execute Command Stage In Datastage 4
A security enhancement was introduced in IS 8.5 FP2 that requested for all passwords be obfuscated in the displayed command and command output and as a result the above behaviour has been changed. The obfuscation can be turned off by setting the environment variable 'DS_EXECUTE_NO_MASKING'
A patch APAR=JR43031 has also been raised for this issue to be fixed.
A patch APAR=JR43031 has also been raised for this issue to be fixed.
[{'Product':{'code':'SSVSEF','label':'InfoSphere DataStage'},'Business Unit':{'code':'BU001','label':'Analytics Private Cloud'},'Component':'Not Applicable','Platform':[{'code':'PF002','label':'AIX'},{'code':'PF010','label':'HP-UX'},{'code':'PF016','label':'Linux'},{'code':'PF027','label':'Solaris'},{'code':'PF033','label':'Windows'}],'Version':'8.7;8.5.0.2','Edition':'}]
Document Information
Modified date:
16 June 2018
16 June 2018
It is quite a common requirement to apply an action to a group of files, for example reading a group of input files, deleting some temporary files, archiving files etc. This can be achieved by using the unix ls -m command to generate a comma-separated list then using this as the list for a Loop activity.
Example – Delete all the datasets in a folder.
All the files that meet the pattern ‘*.ds’ in a folder must be removed using the orchadmin command. The folder name is a parameter to the sequence.
Step 1 Generate the list of files. Add an Execute Command Stage to generate a comma-separated list of files with this command line
Step 2 Remove Carriage Returns with a User Variables stage acting on the command output.
Step 3 Use the list of files in a Start Loop stage
Step 4 Inside the loop the $Counter will contain the filename, add an Execute Command stage to invoke Orchadmin.
This simple example calls a unix command line, but the execute stage could be another sequence or a parallel job activity with the filename as a parameter.