.\" Copyright (C) 1994-2018 Altair Engineering, Inc.
.\" For more information, contact Altair at www.altair.com.
.\"
.\" This file is part of the PBS Professional ("PBS Pro") software.
.\"
.\" Open Source License Information:
.\"
.\" PBS Pro is free software. You can redistribute it and/or modify it under the
.\" terms of the GNU Affero General Public License as published by the Free
.\" Software Foundation, either version 3 of the License, or (at your option) any
.\" later version.
.\"
.\" PBS Pro is distributed in the hope that it will be useful, but WITHOUT ANY
.\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
.\" FOR A PARTICULAR PURPOSE.
.\" See the GNU Affero General Public License for more details.
.\"
.\" You should have received a copy of the GNU Affero General Public License
.\" along with this program. If not, see .
.\"
.\" Commercial License Information:
.\"
.\" For a copy of the commercial license terms and conditions,
.\" go to: (http://www.pbspro.com/UserArea/agreement.html)
.\" or contact the Altair Legal Department.
.\"
.\" Altair’s dual-license business model allows companies, individuals, and
.\" organizations to create proprietary derivative works of PBS Pro and
.\" distribute them - whether embedded or bundled with other software -
.\" under a commercial license agreement.
.\"
.\" Use of Altair’s trademarks, including but not limited to "PBS™",
.\" "PBS Professional®", and "PBS Pro™" and Altair’s logos is subject to Altair's
.\" trademark licensing policies.
.\"
.TH pbs_submitresv 3B "29 August 2011" Local "PBS Professional"
.SH NAME
pbs_submitresv - submit a pbs reservation
.SH SYNOPSIS
#include
.br
#include
.sp
.B char *pbs_submitresv(\^int\ connect, struct\ attropl\ *attrib, char\ *extend)
.SH DESCRIPTION
Issue a batch request to submit a new reservation.
.LP
A
.I "Submit Reservation"
batch request is generated and sent to the server over the connection
specified by
.I connect
which is the return value of \f3pbs_connect\f1().
.LP
The parameter,
.I attrib ,
is a list of
.I attropl
structures which is defined in pbs_ifl.h as:
.sp
.Ty
.nf
struct attrl {
char *name;
char *resource;
char *value;
struct attrl *next;
enum batch_op op;
};
.fi
.sp
The
.I attrib
list is terminated by the first entry where
.I next
is a null pointer.
.LP
The
.I name
member points to a string which is the name of the attribute. The
.I value
member points to a string which is the value of the attribute.
The attribute names are defined in pbs_ifl.h.
.LP
If an attribute is not named in the
.I attrib
array, the default action will be taken. It will either be assigned
the default value or will not be passed with the reservation. The action
depends on the attribute.
If
.I attrib
itself is a null pointer, then the default action will be taken for
each attribute.
.LP
Associated with an attribute of type ATTR_l (the letter ell)
is a resource name indicated by
.I resource
in the
.I attrl
structure.
All other attribute types should have a pointer to a null string for
.I resource .
.LP
The
.I op
member is forced to a value of
.I SET
by pbs_submitresv().
.LP
The parameter,
.I extend ,
is reserved for implementation-defined extensions.
.LP
The return value is a character string which is the
.I reservation_identifier
assigned to the job by the server.
The space for the
.I reservation_identifier
string is allocated by \f3pbs_submitresv\f1()
and should be released via a call to \f3free\f1()
by the user when no longer needed.
.SH "SEE ALSO"
pbs_rsub(1B) and pbs_connect(3B)
.SH DIAGNOSTICS
When the batch request generated by pbs_submitresv()
function has been completed successfully by a batch server, the routine will
return a pointer to a character string which is the job identifier of the
submitted batch job.
Otherwise, a null pointer is returned and the error code is set in pbs_error.