Job Name

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Thibal
Participant
Posts: 56
Joined: Tue Mar 30, 2004 3:43 am
Location: Nanterre, France

Job Name

Post by Thibal »

Hi,

my question is very sample :
In a Job Server, is there a variable containing the Job Name ?
I don't find it in system variables ...

I just want to avoid to use a parameter to get it.

Thanks !


(sorry but when I search for "Job Name", results aren't relevant ...)
Thibault Hamel
Nanterre - France
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

go to macros, and then choose DSJobName.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Thibal
Participant
Posts: 56
Joined: Tue Mar 30, 2004 3:43 am
Location: Nanterre, France

Post by Thibal »

Thanks, I've never used macro in Transformer before ... :oops:

But if I want to use Job Name in a Sequential File Name, parameters between # is the only solution ?
Thibault Hamel
Nanterre - France
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Post by I_Server_Whale »

I think that is a good solution. Why? What is stopping you from using the parameter within #'s as a part of the sequential file name? :?:
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

if you want to use it in a job name then i would say yes, no other choice but to use a job parameter.
Maybe the DS gurus know of some other way, as far as my knowledge, you have to use a job parameter (variable between two #'s)
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Thibal
Participant
Posts: 56
Joined: Tue Mar 30, 2004 3:43 am
Location: Nanterre, France

Post by Thibal »

naveendronavalli wrote:I think that is a good solution. Why? What is stopping you from using the parameter within #'s as a part of the sequential file name? :?:
Nothing. I wasn't sure I wasn't doing something stupid.

Thanks you both. :D
Thibault Hamel
Nanterre - France
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

hey, Thibal, waitup
i did a search and found a reply by vmcburney, i knew the DSgurus would know,
this is his reply
"It's easy, macros can be treated just like job parameters, you can use DSJobInvocationID in your file paths and file names surrounded by # characters. I've done this in the past using macros for project name and job name in file names. "

apparantly you can use macros within #'s and it will work. Try it.
do this
specify the path name and add this /#DSJobName#.txt
that should work.
cheers.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Yup it works gracefully. I just ran a test on it.
Your all set Thibal. :lol:
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Thibal
Participant
Posts: 56
Joined: Tue Mar 30, 2004 3:43 am
Location: Nanterre, France

Post by Thibal »

Thanks !! I'll try it ... again.

I don't know where is my mistake :?

I'll tell you tomorrow :wink:
Thibault Hamel
Nanterre - France
Thibal
Participant
Posts: 56
Joined: Tue Mar 30, 2004 3:43 am
Location: Nanterre, France

Post by Thibal »

You're right Image

Thanks Image

My mistake was testing #'s with system variables (@WHO, @LOGNAME), in that case, it doesn't work.
Thibault Hamel
Nanterre - France
Post Reply