Concatenate files in an Execute Command stage in Sequence

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
jweir
Participant
Posts: 134
Joined: Wed Aug 04, 2010 12:31 pm

Concatenate files in an Execute Command stage in Sequence

Post by jweir »

Hello,

I am trying to concatenate several files into one file in a execute command stage. I am successful in concatenating them in Unix, however not in DataStage. Below is what I have written in my execute command stage:

Command: cat
Parameter: #GetPROJDEFValues.$Target_file_location#cust_mstr_r3_* >> cust_mstr_r3.txt


The parameter (#GetPROJDEFValues.$Target_file_location#) is my target file path.

I have several files that start with 'cust_mstr_r3_' and I wish to combine them all into one file called 'cust_mstr_r3.txt'

The sequence runs successfully, however it does not create my master file. Any siggestions?
Jweir

--- If strength were all, tiger would not fear scorpion.
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

Add full path to the target file cust_mstr_r3.txt
You are the creator of your destiny - Swami Vivekananda
jweir
Participant
Posts: 134
Joined: Wed Aug 04, 2010 12:31 pm

Post by jweir »

Thanks anbu! :lol:
Jweir

--- If strength were all, tiger would not fear scorpion.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

It is getting created, just not where you are expecting. Relative pathed files end up in the job's Project directory, check there.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply