DS Job Type Identification - Server or PX in Unix
Moderators: chulett, rschirm, roy
DS Job Type Identification - Server or PX in Unix
Hi,
We have both Server & Parallel jobs in our project depending on the requirements.The Parameters for both are different.
So to dynamically pass the param values at runtime from a seperate param file we need to know whether the job is a Server or Parallel job.
The job name itself, which is an argument to the DS run Unix script, doesn't provide any unique identifier.
Is there any way by which we can find this out?
NV
We have both Server & Parallel jobs in our project depending on the requirements.The Parameters for both are different.
So to dynamically pass the param values at runtime from a seperate param file we need to know whether the job is a Server or Parallel job.
The job name itself, which is an argument to the DS run Unix script, doesn't provide any unique identifier.
Is there any way by which we can find this out?
NV
I know it's been documented in the forums, I just don't remember the answer. From what I recall, Kim Duke posted some code that illustrated how to check.
You can see some of the information in the dsapi.h file under the $DSHOME/include directory. The Repos Information section shows:
The secret is knowing how to get this information from the repository.
You can see some of the information in the dsapi.h file under the $DSHOME/include directory. The Repos Information section shows:
Code: Select all
#define DSS_JOBS 1 /* The Object Type to return */
#define DSS_JOB_ALL 15 /* list all jobs */
#define DSS_JOB_SERVER 1 /* list all server jobs */
#define DSS_JOB_PARALLEL 2 /* list all parallel jobs */
#define DSS_JOB_MAINFRAME 4 /* list all mainframe jobs */
#define DSS_JOB_SEQUENCE 8 /* list all sequence jobs */
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
The JOBTYPEIND in DS_JOBS repository table will identify parallel jobs from server jobs.
Here are the indicators:
Server Jobs - 0
Parallel Jobs - 3
Job Sequences - 2
A simple uv query would bewhere n is one of the indicators listed above.
Here are the indicators:
Server Jobs - 0
Parallel Jobs - 3
Job Sequences - 2
A simple uv query would be
Code: Select all
SELECT NAME FROM DS_JOBS WHERE JOBTYPEIND = 'n';
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You'd probably want to flip the query around for your needs:
And then handle your parameters accordingly based on the type retrieved.
Code: Select all
SELECT JOBTYPEIND FROM DS_JOBS WHERE NAME = 'YourJobName';
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers