Hi all,
I am wokring on a log generation utility using unix shell scripting,here i m trying to find out existence of job name and project name in DS server.Is there any unix command to retrieve these information,any suggestion.?? I want to write script like
Check job name,project name existence
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 132
- Joined: Tue Sep 04, 2007 11:38 am
- Location: NOIDA
Uv command
may be you can use a uv command to LIST all the job names in the project directry, and write it to a file and then search in that file....this shd give you the syntax.
-
- Premium Member
- Posts: 132
- Joined: Tue Sep 04, 2007 11:38 am
- Location: NOIDA
Re: Uv command
Yes that i am thinking,but how can go to UV prompt and save job name to file....Nagaraj wrote:may be you can use a uv command to LIST all the job names in the project directry, and write it to a file and then search in that file....this shd give you the syntax.
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Why don't you try the command level API dsjob. That does all the work for you.
To log into UV schema, you need to know the correct project name. So if the project name is incorrect, that itself will fail. Which means you will have to list all schemas available to locate the project first.
So no point going in this direction.
To log into UV schema, you need to know the correct project name. So if the project name is incorrect, that itself will fail. Which means you will have to list all schemas available to locate the project first.
So no point going in this direction.
Without going into details (meaning: please don't offer advice on improving this, I fought that fight and lost), here is a sample Unix line to retrieve log messages.
"Info_Msg" is an home-grown utility to direct echoes to the log file. In this example, I'm only interested in the last 10 (-max) fatal error messages, and in my case I maintain a text file for each sequencer and the jobs it invokes (IJOB). I have looping involved, but I don't want to crowd this example. All of the parameters are explained in the Advanced User Guide at the section header "Command Line Interface" at the bullet "Accessing Log Files".
Code: Select all
if [[ ${JobStat} == ${DSJS_RUNFAILED} ]]; then
ErrorDisplay=$(${G_DS_HOME}/bin/dsjob -logsum -type FATAL
-max {MaxDsplyErrors} ${G_DS_PROJ_NAME} ${IJOB})
Info_Msg "${ErrorDisplay}"
fi