Hi frnds..
I have a urgent requirement for Identifying number of columns being used in each stage in a server job. Any idea how can this be accomplished ?
Thanks in advance
Counting number of columns used in a job
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
DSJOBS and DSJOB_OBJECTS or .dsx ???
DS JOB OBJECTS I believe has all the data in it. But how to get the column count across all stages ?
To get 3 parameters in a job I would say
SELECT
DS_JOBS.NAME AS JOB_NAME,
EVAL DS_JOBOBJECTS."@RECORD<14,1>" ,
EVAL DS_JOBOBJECTS."@RECORD<14,2>" ,
EVAL DS_JOBOBJECTS."@RECORD<14,3>"
FROM DS_JOBS, DS_JOBOBJECTS
WHERE DS_JOBS.NAME LIKE '%#JobsLike#%'
AND DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDNO
AND DS_JOBOBJECTS.OLETYPE='CJobDefn';
I dont know how to look into the @RECORD to get the column count
The above query I got from DSExchange only...
To get 3 parameters in a job I would say
SELECT
DS_JOBS.NAME AS JOB_NAME,
EVAL DS_JOBOBJECTS."@RECORD<14,1>" ,
EVAL DS_JOBOBJECTS."@RECORD<14,2>" ,
EVAL DS_JOBOBJECTS."@RECORD<14,3>"
FROM DS_JOBS, DS_JOBOBJECTS
WHERE DS_JOBS.NAME LIKE '%#JobsLike#%'
AND DS_JOBS.JOBNO = DS_JOBOBJECTS.OBJIDNO
AND DS_JOBOBJECTS.OLETYPE='CJobDefn';
I dont know how to look into the @RECORD to get the column count
The above query I got from DSExchange only...
Django
If a simple dsx project requires such intelligence how much more is required to create this Cosmic System. Who dares to say there is no intelligence behind this creation i.e. no GOD .....
If a simple dsx project requires such intelligence how much more is required to create this Cosmic System. Who dares to say there is no intelligence behind this creation i.e. no GOD .....
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Re: Counting number of columns used in a job
By signing up with your support provider for priority service, where you will learn the true cost of "urgent".Django wrote:I have a urgent requirement... Any idea how can this be accomplished ?
We don't do "urgent" here. DSXchange is an all-volunteer site whose members post when they can, and only (usually) if they have something pertinent to contribute.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
It can be accomplished easily. Simply open the job design in Designer and inspect. The Columns grids in most cases have row numbers. This will make your task easier.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Determining at runtime
Sorry about using the word 'Urgent'. I understand this is a free service in one sense. But I did pay to become a premium member. I have derived unlimited benefits from this site especially from Ray which is beyond what I have paid. So I agree with Ray.
Now can you please help give a direction as to how to find the number of columns by looking into the datastage repository.
I believe the @RECORD has all the necessary data in it. But how to get that ?. Ray/others please help...
how to adjust the EVAL function to read appropriately ?. What does this EVAL really do ?? and how to format it and how to arrive at the right data... ? any idea ??
EVAL DS_JOBOBJECTS."@RECORD<??>"
Now can you please help give a direction as to how to find the number of columns by looking into the datastage repository.
I believe the @RECORD has all the necessary data in it. But how to get that ?. Ray/others please help...
how to adjust the EVAL function to read appropriately ?. What does this EVAL really do ?? and how to format it and how to arrive at the right data... ? any idea ??
EVAL DS_JOBOBJECTS."@RECORD<??>"
Django
If a simple dsx project requires such intelligence how much more is required to create this Cosmic System. Who dares to say there is no intelligence behind this creation i.e. no GOD .....
If a simple dsx project requires such intelligence how much more is required to create this Cosmic System. Who dares to say there is no intelligence behind this creation i.e. no GOD .....
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You have at least two problems that I can see.
1. The number of columns is likely to be inconstant across links in a job design, which mitigates against a generic solution to "columns used in a job".
2. Different record types in DS_JOBOBJECTS have different structure, so there is no single expression that would suit. Even different link type entries have different structures*.
So how about you have a much deeper think about what you actually require, and whether there's any useful mechanism for handling that, such as systematic link names.
* They really are clever things, hashed files!
1. The number of columns is likely to be inconstant across links in a job design, which mitigates against a generic solution to "columns used in a job".
2. Different record types in DS_JOBOBJECTS have different structure, so there is no single expression that would suit. Even different link type entries have different structures*.
So how about you have a much deeper think about what you actually require, and whether there's any useful mechanism for handling that, such as systematic link names.
* They really are clever things, hashed files!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
I am truly curious why anyone would have a "need" to "Identify the number of columns being used in each stage in a server job"? To what purpose? What problem are you trying to solve?
Perhaps if we attack the problem from a different angle there will be a better solution.
Perhaps if we attack the problem from a different angle there will be a better solution.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers