need unix script

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

bobbysridhar
Premium Member
Premium Member
Posts: 41
Joined: Sun Mar 09, 2008 8:12 pm

Post by bobbysridhar »

Hi,
How can we view the file in Unix that was given the file name as
\pathname\filename_#DSJobstarttimestamp#.txt. I was able to create new file everytime the job runs. But do not know how to view the contents of that file in unix because there is space in the file as it has timestamp in it.
Could somebody help in syntax to view the file with timestamp in its name.
k.v.sreedhar
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Already done did that.
chulett wrote:You can view it in UNIX, you'd just need to enclose the filename (spaces and all) in single quotes to do so.
-craig

"You can never have too many knives" -- Logan Nine Fingers
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

Double quotes work also.

So do wildcards. cat filename_*.txt.
Choose a job you love, and you will never have to work a day in your life. - Confucius
vamsi.4a6
Participant
Posts: 334
Joined: Sun Jan 22, 2012 7:06 am
Contact:

Post by vamsi.4a6 »

How you added #DSJobstarttimestamp# to filename because i have not seen any DS Macro functions for sequential stage file property and it is available in transformer.Please correct me if i am wrong?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You just type it in.
-craig

"You can never have too many knives" -- Logan Nine Fingers
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

You can also open the derivation editor in a Transformer stage, right-click to choose it out of the DS Macro... list, and copy it to your clipboard from there. If you paste it into a filename then you have to add the # signs yourself.
Choose a job you love, and you will never have to work a day in your life. - Confucius
Post Reply