pbs_alterjob(3B)

NAME
pbs_alterjob - alter PBS batch job

SYNOPSIS
#include <pbs_error.h>
#include <pbs_ifl.h>

int pbs_alterjob(int connect, char *job_id, struct attrl *attrib, char *extend)

DESCRIPTION
Issue a batch request to alter a batch job.

A Modify Job batch request is generated and sent to the server over the connection specified by connect which is the return value of pbs_connect().

The argument, job_id , identifies which job is to be altered. It is specified in the form:
    sequence_number.server

The parameter, attrib , is a pointer to an attrl structure which is defined in pbs_ifl.h as:

    struct attrl {
        char *name;
        char *resource;
        char *value
        struct attrl *next;
    };
The attrib list is terminated by the first entry where next is a null pointer.

The name member points to a string which is the name of the attribute. The value member points to a string which is the value of the attribute. The attribute names are defined in pbs_ifl.h.

If attrib itself is a null pointer, then no attributes are altered.

Associated with an attribute of type ATTR_l (the letter ell) is a resource name indicated by resource in the attrl structure. All other attribute types should have a pointer to a null string ("") for resource .

If the resource of the specified resource name is already present in the job's Resource_List attribute, it will be altered to the specified value. If the resource is not present in the attribute, it is added.

Certain attributes of a job may or may not be alterable depending on the state of the job; see qalter(1B).

The parameter, extend , is reserved for implementation-defined extensions.

SEE ALSO
qalter(1B), qhold(1B), qrls(1B), qsub(1B), pbs_connect(3B), pbs_holdjob(3B), and pbs_rlsjob(3B)

DIAGNOSTICS
When the batch request generated by pbs_alterjob() function has been completed successfully by a batch server, the routine will return 0 (zero). Otherwise, a non zero error is returned. The error number is also set in pbs_errno.