pbs_alterjob.3B 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. .\" Copyright (C) 1994-2018 Altair Engineering, Inc.
  2. .\" For more information, contact Altair at www.altair.com.
  3. .\"
  4. .\" This file is part of the PBS Professional ("PBS Pro") software.
  5. .\"
  6. .\" Open Source License Information:
  7. .\"
  8. .\" PBS Pro is free software. You can redistribute it and/or modify it under the
  9. .\" terms of the GNU Affero General Public License as published by the Free
  10. .\" Software Foundation, either version 3 of the License, or (at your option) any
  11. .\" later version.
  12. .\"
  13. .\" PBS Pro is distributed in the hope that it will be useful, but WITHOUT ANY
  14. .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  15. .\" FOR A PARTICULAR PURPOSE.
  16. .\" See the GNU Affero General Public License for more details.
  17. .\"
  18. .\" You should have received a copy of the GNU Affero General Public License
  19. .\" along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. .\"
  21. .\" Commercial License Information:
  22. .\"
  23. .\" For a copy of the commercial license terms and conditions,
  24. .\" go to: (http://www.pbspro.com/UserArea/agreement.html)
  25. .\" or contact the Altair Legal Department.
  26. .\"
  27. .\" Altair’s dual-license business model allows companies, individuals, and
  28. .\" organizations to create proprietary derivative works of PBS Pro and
  29. .\" distribute them - whether embedded or bundled with other software -
  30. .\" under a commercial license agreement.
  31. .\"
  32. .\" Use of Altair’s trademarks, including but not limited to "PBS™",
  33. .\" "PBS Professional®", and "PBS Pro™" and Altair’s logos is subject to Altair's
  34. .\" trademark licensing policies.
  35. .\"
  36. .TH pbs_alterjob 3B "3 March 2015" Local "PBS Professional"
  37. .SH NAME
  38. pbs_alterjob - alter PBS batch job
  39. .SH SYNOPSIS
  40. #include <pbs_error.h>
  41. .br
  42. #include <pbs_ifl.h>
  43. .sp
  44. .B "int pbs_alterjob(\^int connect, char\ *job_id, struct\ attrl\ *attrib, char\ *extend\^)"
  45. .SH DESCRIPTION
  46. Issue a batch request to alter a batch job.
  47. .LP
  48. A
  49. .I "Modify Job"
  50. batch request is generated and sent to the server over the connection
  51. specified by
  52. .I connect
  53. which is the return value of \f3pbs_connect\f1().
  54. .LP
  55. The argument,
  56. .I job_id ,
  57. identifies which job is to be altered. It is specified in the form:
  58. .br
  59. .RS 4
  60. .I sequence_number.server
  61. .RE
  62. .LP
  63. The parameter,
  64. .I attrib ,
  65. is a pointer to an
  66. .I attrl
  67. structure which is defined in pbs_ifl.h as:
  68. .sp
  69. .Ty
  70. .nf
  71. struct attrl {
  72. char *name;
  73. char *resource;
  74. char *value
  75. struct attrl *next;
  76. };
  77. .fi
  78. The
  79. .I attrib
  80. list is terminated by the first entry where
  81. .I next
  82. is a null pointer.
  83. .LP
  84. The
  85. .I name
  86. member points to a string which is the name of the attribute. The
  87. .I value
  88. member points to a string which is the value of the attribute.
  89. The attribute names are defined in pbs_ifl.h.
  90. .br
  91. .LP
  92. If
  93. .I attrib
  94. itself is a null pointer, then no attributes are altered.
  95. .LP
  96. Associated with an attribute of type ATTR_l (the letter ell)
  97. is a resource name indicated by
  98. .I resource
  99. in the
  100. .I attrl
  101. structure.
  102. All other attribute types should have a pointer to a null string ("") for
  103. .I resource .
  104. .LP
  105. If the resource of the specified resource name is already present in the job's
  106. .I Resource_List
  107. attribute, it will be altered to the specified value. If the resource
  108. is not present in the attribute, it is added.
  109. .LP
  110. Certain attributes of a job may or may not be alterable depending on
  111. the state of the job; see \f3qalter\f1(1B).
  112. .sp
  113. .LP
  114. The parameter,
  115. .I extend ,
  116. is reserved for implementation-defined extensions.
  117. .SH "SEE ALSO"
  118. qalter(1B), qhold(1B), qrls(1B), qsub(1B), pbs_connect(3B), pbs_holdjob(3B),
  119. and pbs_rlsjob(3B)
  120. .SH DIAGNOSTICS
  121. When the batch request generated by \f3pbs_alterjob\f1()
  122. function has been completed successfully by a batch server, the routine will
  123. return 0 (zero).
  124. Otherwise, a non zero error is returned. The error number is also set
  125. in pbs_errno.