Hi,
Could anyone guide me how can i implement Utilityabortlog() fuctionality of server to parallel routine C code.
What all the declaration is required.
Please help me out on this if anyone has done on this.
Thanks
How to call DSfunction in C routine in paralle
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Thanks Sainath...Sainath.Srinivasan wrote:A simple fprintf will do the task.
You can use an exit to abort. ...
I have attached my code below, actually my requiremnt is that i need to abort the job if certain condition does not match
$DSHOME/include/dsapi.h
#include DSINCLUDE JOBCONTROL.H
#include DSINCLUDE DSD_CONST.H
#include DSINCLUDE DSD.H
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
char get_msg_code ( char *,char *,char *);
char get_msg_code ( char *trailercount,char *detailrecordcount,char *recordlength)
{
char Errormessage="Input file is valid";
if (((detailrecordcount-2 )==( trailercount)) and recordlength=800)
{
Else if ((detailrecordcount-2 )!=( trailercount))
{
Call DSLogFatal("File header and trailer does not match", "Jobname") ;
exit (1);
}
Else if (((detailrecordcount-2 )!=( trailercount)) and (recordlength>800 or recordlength<800))
{
Call DSLogFatal("Informat source file", "Jobname") ;
exit (1);
}
}
return Errormessage;
} /* End */