Corporate Standard is no Job Sequences - I need to change it

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

palmeal
Participant
Posts: 122
Joined: Thu Oct 14, 2004 7:56 am
Location: Edinburgh, Scotland

Corporate Standard is no Job Sequences - I need to change it

Post by palmeal »

I am wondering what options exist, when running Job Sequences, to get failure information regarding the underlying Server Jobs.
Assuming that I have no access to Director on UAT and Production servers what other options do I have ?

I know that if using dsjob then there is a "-logdetail" that I can add. Does this dump log detail for the job that the sequence calls or if it's limited to just the sequence ?

I am being told that my Company's corporate standard is not to use Job Sequences but I can't see how I can split my tasks up into calls to each separate Server Job as the Job Sequence activities are inter-related and depend on activities such as StartLoops and many trigger events.
I am also being told that another standard is that Sendmail is not supported.

I have a number of Notification Activities in my sequence that I could change to sequential files and let Tivoli monitor them for certain failure flag values that I would set. What I need to do is marry this up with how to get Director Log information out to a file in an attempt to allow Job Sequences to be supported.

Any thoughts on what options I have available would be very much appreciated.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: Corporate Standard is no Job Sequences - I need to chang

Post by chulett »

palmeal wrote:I am being told that my Company's corporate standard is not to use Job Sequences. I am also being told that another standard is that Sendmail is not supported.
Those are... interesting... non-standards to be saddled with. :roll:
-craig

"You can never have too many knives" -- Logan Nine Fingers
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
can you post what is the reason for the limitations?
(so we might understand better and offer an apropriate solution).

Geussing you have a central schedualer and monitor?!
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
palmeal
Participant
Posts: 122
Joined: Thu Oct 14, 2004 7:56 am
Location: Edinburgh, Scotland

Post by palmeal »

I was told that Job Sequences weren't supported so I challenged that asking why. The response I got is below - hopefully it is just a matter for me to find out what my options are and inform them :-

The reason that I initially made that statement (i.e Job Sequences not supported") was based on the fact that developers will not have access to the DataStage Director in UAT or Production. I am not certain that dsjob -logdetail actually dumps log detail for the job that the sequence calls or if it's limited to just the sequence. If it's the latter, you will not know why your called job failed. We are looking into that now. However, if you were to use autosys as the caller and sequencer, you would know when the autosys job failed and have the ability to dump the log. Here is an example of a typical perl script that invokes dsjob. If you have an alternative method that will allow you to be notified and give you the ability to view why the job failed, please send it along. The use of sendmail on unix is not a restriction imposed by my group. That is the corporate standard. While it does exist on the server, the unix sys admins will not support issues that arise from the use of it. (we use it, but be aware that it is not supported)
palmeal
Participant
Posts: 122
Joined: Thu Oct 14, 2004 7:56 am
Location: Edinburgh, Scotland

Post by palmeal »

Roy

I know we use autosys and I think Tivoli plays a part for monitoring failed processes but I'm not sure about that. Access to UAT and Production Director logs is definitely not an option.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Curious on how they plan on restricting that?
-craig

"You can never have too many knives" -- Logan Nine Fingers
palmeal
Participant
Posts: 122
Joined: Thu Oct 14, 2004 7:56 am
Location: Edinburgh, Scotland

Post by palmeal »

Craig

If you mean access to the UAT and Production servers then I guess it will be physically controlled by access to the UNIX servers. Looks like I'm going to have to play the game unless someone knows a way of getting the same information out as is sent to the Director Logs.
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Can you have log agents placed there ?
if so you can manage an ascii log file (writing in append to it)
and they will monitor those ascii logs.
I had some projects where we used this method to get the relevant info to the organization's central monitor system.
any flavour of this solution (like loging to tables and such) you can use might be your solution for being able to use sequence jobs IMHO.
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
palmeal
Participant
Posts: 122
Joined: Thu Oct 14, 2004 7:56 am
Location: Edinburgh, Scotland

Post by palmeal »

Roy

I'm not familar with log agents - are you saying that we can write Director Log information to an ascii file ? If this is possible then I might be able to write this to a file remotely on a server that can be easily accessed (FTP Activity perhaps or remote shell ?)
If so how do I write the information to the log file ?
palmeal
Participant
Posts: 122
Joined: Thu Oct 14, 2004 7:56 am
Location: Edinburgh, Scotland

Post by palmeal »

I have yet decided what way to do this yet - the log alerts method would probably be the best for me in order to keep my job sequences but whatever way I do this I have to be able to pull data from the Director Logs.

I've been having a play with some of the basic commands for getting informastion out of the Director Log but can't seem to get my head around how to write this information out to a file. I thought of writing a routine that would break out to UNIX and run a type command to send data to a file but I can't use the string values that I create in this way.

The code below is what I have written - I want to be able to write ShortDesc,LongDesc and RejEntries out to a file that I can then FTP off of the UAT/Production server. I'm sure this will be a one liner !!

ProgramName = 'CheckSQLServerAvailable'
JobHandle = DSAttachJob(ProgramName, DSJ.ERRFATAL)

IF (JobHandle = DSJE.BADHANDLE) THEN CALL DSLogFatal('Fatal','')
ShortDesc = DSGetJobInfo(JobHandle,DSJ.JOBDESC)
LongDesc = DSGetJobInfo(JobHandle,DSJ.JOBFULLDESC)
Warning = DSGetNewestLogId (JobHandle, DSJ.LOGWARNING)
RejEntries = DSGetLogEntry(JobHandle, Warning)

I know that the above code pulls out most of what I want as I have, ironically, written the above string variables to the log to confirm what values they have.
palmeal
Participant
Posts: 122
Joined: Thu Oct 14, 2004 7:56 am
Location: Edinburgh, Scotland

Job Sequences and Server Job Logs

Post by palmeal »

This is a continuation of the thread viewtopic.php?t=92923 but I need one final bit of help to close this topic off.

I have managed to pull data from the Director Log which I now want to write out to a text file.

The commands that I have used to pull out the information that I require are

ProgramName = 'CheckSQLServerAvailable'
JobHandle = DSAttachJob(ProgramName, DSJ.ERRFATAL)

IF (JobHandle = DSJE.BADHANDLE) THEN CALL DSLogFatal('Fatal','')
ShortDesc = DSGetJobInfo(JobHandle,DSJ.JOBDESC)
LongDesc = DSGetJobInfo(JobHandle,DSJ.JOBFULLDESC)
Warning = DSGetNewestLogId (JobHandle, DSJ.LOGWARNING)
RejEntries = DSGetLogEntry(JobHandle, Warning)


What I need help with is how to get the values of ShortDesc, RejEntries etc out to file. (I'm aware I have to break the strings up but that is not a problem). I tried breaking out to UNIX and TYPEing the values to a file but that is not a valid operation with strings.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Palmeal,

Add some code to your Function:

OPENSEQ '/tmp/DSLogfile.txt' TO SeqFilePtr THEN WEOFSEQ(SeqFilePtr) ELSE NULL

WRITESEQ 'Job Description is "':ShortDesc:'".' ON SeqFilePtr ELSE CALL DSLogWarn('Unable to write to sequential file','')

CLOSESEQ SeqFilePtr
palmeal
Participant
Posts: 122
Joined: Thu Oct 14, 2004 7:56 am
Location: Edinburgh, Scotland

Post by palmeal »

Thanks ArndW - I will give this a try when I stop getting the following error

job_seq4..JobControl (GETLOGENTRY ROWS): 2005-05-20 06:22:07\palmeal\2\DSD_SendEvent.B:Error Starting run
Cmd = SH -c'ActivityCmd START -file MSEVENTS/20050520062206000'
Output = ERROR: Couldn't get I/O for the connection to: localhost.
ReturnCode = 1

Have to wait until the States wakes up though.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Palmeal,

what is your DSExecute command - the output looks... wrong...
palmeal
Participant
Posts: 122
Joined: Thu Oct 14, 2004 7:56 am
Location: Edinburgh, Scotland

Post by palmeal »

I'm getting this error when after I run the final DSLogInfo in the code below. It is in the output of the DSGetLogEntry. If I comment out this code then a similar message is displayed for a routine further down in Job sequence- seems to point towards a network issue/listener file/host file or I suppose my code ? this code has worked previously though.

ProgramName = 'CheckSQLServerAvailable'
JobHandle = DSAttachJob(ProgramName, DSJ.ERRFATAL)

IF (JobHandle = DSJE.BADHANDLE) THEN CALL DSLogFatal('Fatal','')
ShortDesc = DSGetJobInfo(JobHandle,DSJ.JOBDESC)
LongDesc = DSGetJobInfo(JobHandle,DSJ.JOBFULLDESC)

RejEntries = DSGetLogEntry(JobHandle, warning)
call DSLogInfo (RejEntries,"GETLOGENTRY ROWS")
Post Reply