PL/SQL API jcs_odf.alter_script
Summary
Alter a script.
Specification
procedure alter_script(owner in varchar2,
name in varchar2,
description in varchar2 default const.def_str,
application in varchar2 default const.def_str,
parameters in varchar2 default const.def_str,
format_name in varchar2 default const.def_str,
queue_name in varchar2 default const.def_str,
time_window_name in varchar2 default const.def_str,
resource_name in varchar2 default const.def_str,
priority in number default const.def_num,
verify in varchar2 default const.def_str,
restart_unknown in varchar2 default const.def_str,
restart_error in varchar2 default const.def_str,
restart_killed in varchar2 default const.def_str,
account in varchar2 default const.def_str,
keep_versions in number default const.def_num,
keep_per_user in varchar2 default const.def_str,
keep_until in varchar2 default const.def_str,
lock_name in varchar2 default const.def_str,
exclusive_execution in varchar2 default const.def_str,
overdue in varchar2 default const.def_str,
restart_completed in varchar2 default const.def_str,
comment_text in varchar2 default const.def_str,
nocompile in varchar2 default const.def_str,
version in number default null,
force in varchar2 default const.def_str,
restart_count in number default const.def_num,
status_on_submit in varchar2 default const.def_str,
use_directory in varchar2 default const.def_str,
use_context_defaults in varchar2 default const.def_str,
lightweight in varchar2 default const.def_str,
keep_type in varchar2 default const.def_str,
optional_tw in varchar2 default const.def_str,
keep_status in varchar2 default const.def_str,
scripttype_name in varchar2 default const.def_str,
eval_text in varchar2 default const.jcs_yes,
event_expression in varchar2 default const.def_str,
keep_force in varchar2 default const.def_str,
submit_frame_status in varchar2 default const.def_str,
returncode_map_to_completed in varchar2 default const.def_str,
pin_to_parent_scheduler in varchar2 default const.def_str,
application_partition in varchar2 default const.def_str,
format_partition in varchar2 default const.def_str,
lock_partition in varchar2 default const.def_str,
queue_partition in varchar2 default const.def_str,
time_window_partition in varchar2 default const.def_str,
resource_partition in varchar2 default const.def_str,
scripttype_partition in varchar2 default const.def_str,
os_user in varchar2 default const.def_str,
allow_destination in varchar2 default const.def_str,
reset_statistics in varchar2 default const.jcs_no,
max_priority in number default const.def_num,
no_full_text_search in varchar2 default const.def_str,
no_triggers in varchar2 default const.def_str,
no_statistics in varchar2 default const.def_str,
no_wait in varchar2 default const.def_str,
optional_sf in varchar2 default const.def_str,
submit_frame_partition in varchar2 default const.def_str,
submit_frame_name in varchar2 default const.def_str)
Parameters
- owner - the owner of the script
- name - the name of the script
- description - a description for the script
- application - the name of the application this script belongs to
- parameters - the list of parameters
- format_name - the name of the format used for the job output
- queue_name - the name of the queue in which the job must be executed
- time_window_name - the name of the time window during which the job must be executed
- resource_name - the name of the resource specifying which process server cluster must be used for the job execution
- priority - the priority of a job, where 1 is the minimum priority and 100 the maximum priority
- verify - 'Y' or 'N': job parameter validation and/or password validation is not performed at execution, which reduces job CPU load
- restart_unknown - the job will be automatically restarted when status is set to UNKNOWN
- restart_error - the job will be automatically restarted when status is set to ERROR
- restart_killed - the job will be automatically restarted when status is set to KILLED
- account - when a job requires a connection to an Oracle database (such as for the execution of a PL/SQL program) the process server provides two ways to connect to an Oracle database: 'SCRIPT', and 'USER'
- keep_versions - defines the number of versions of a script and its output and log files that are retained
note
In most cases, the process server removes the files when the job ends and a new version of the job output is created. When keep_versions = 0 is specified, however, it removes the files immediately prior to the next time the job starts (when job status changes from SCHEDULED to QUEUED).
- keep_per_user - is only for compatibility, use keep_type
- keep_until - defines a date or a date function when the process server must remove the script and its files
- lock_name - the name of the lock that must be obtained before the job can actually start running (i.e. before the job status changes to RUNNING)
note
When the lock is obtained by another job, this job gets the status LOCKWAIT, until the lock is released.
- exclusive_execution - 'Y' or 'N': indicates that the job must run stand-alone, meaning that it cannot start until there is no other job assigned with statuses RUNNING, WAITING or CONSOLE
- overdue - 'Y' or 'N': job status is OVERDUE if the job has not run when the time window closes, or if the process server is unavailable
- restart_completed - the job will be automatically restarted when status is set to COMPLETED
- comment_text - comment with this script
- nocompile - 'Y' or 'N': when the PL/SQL command text must be executed against another database instead of the Redwood Repository, you can disable compilation of the PL/SQL block by setting this property
- version - the version of the script
- force - 'Y' or 'N': forces certain script parameter changes to succeed even if submitted jobs become invalid
- Without FORCE a parameter that is modified (except on the fields description, display or cmdfile) fails when there are still jobs referring it that do not have a final state.
- Without FORCE a parameter that is deleted (except on the fields description, display or cmdfile) fails when there are still jobs referring it that do not have a final state. The job parameter is removed from all jobs that have reached a final state.
- Without FORCE parameter additions of parameters that are NOT NULL, NOT RUNTIME and have no DEFAULT are forbidden when there are still jobs in a non final state referring this script. By specifying the FORCE flag, these jobs are set to 'MODIFIED'.
- With FORCE a parameter that is modified (except on the fields description, display or cmdfile) sets all jobs that have not yet reached a final state to status 'MODIFIED'.
- With FORCE a parameter that is deleted (except on the fields description, display or cmdfile) sets all jobs that have not yet reached a final state to status 'MODIFIED'. The job parameter is removed from all jobs.
- restart_count - defines the maximum number of times that the job must be restarted by the process server when the job reaches one of the states set by the restart_xxx controls
- status_on_submit - defines with what status the process server creates the job
- 'S' - for status 'SCHEDULED'
- 'H' - for status 'HOLD'
- use_directory - 'Y' or 'N': does the script allow directory specific jobs
- use_context_defaults - 'Y' or 'N': when set the job uses the values of the last run job with this script definition instead of the script defaults
- lightweight - 'Y' or 'N': run the job as a synchronous job, meaning:
- synchronous jobs are processed without a job agent and create no entry in the job table
- synchronous jobs do not create output files or log files
- a synchronous job is processed as a PL/SQL-call enhanced with the process server mechanisms for parameter validation
- keep_type - defines whether the number of versions of a script and its output and log files are retained:
- 'U' - per user
- 'S' - per system
- 'K' - per key
- optional_tw - optional_time_window 'Y' or 'N': if a time window is defined you can choose a different time window at submit time ('Y') or force the pre-defined time window ('N')
- keep_status - only jobs that reach one of the states defined by keep_status are subject to the keep clause of the job definition:
- 'C' - for status 'COMPLETED'
- 'E' - for status 'ERROR'
- 'K' - for status 'KILLED'
- 'U' - for status 'UNKNOWN'
- 'A' - for status 'CANCELED'
- scripttype_name - name of the scripttype used, if any
- eval_text - 'Y' or 'N': evaluate the scripttext - only valid in combination with scripttype_name
- event_expression - an optional 'event-expression' to a script is defined recursively as follows:
- If E is an event then raised(E) is an event-expression
- If E is an event then israised(E) is an event-expression
- If X is an event-expression, then (X) is an event-expression
- If X and Y are event-expressions, then (X AND Y) is an event expression
- If X and Y are event-expressions, then (X OR Y) is an event expression
- If X is an event-expression, then NOT(X) is an event expression.
raised(E) checks if the event has been raised at some moment in time at or after the first check and israised(E) checks if the event currently has the raised status.
note
The brackets in step 4 or 5 are optional, since AND binds stronger than OR, and the unary NOT operator binds stronger than both AND and OR.
note
Each of the events featuring in an event-expression must be one of the wait events of the script. Each wait event E of the script that does not feature in the event-expression is considered to be implicitly concatenated to the event-expression according to the formula: ((<event-expression>) AND raised(E)). Because of the associativity and commutativity of the AND-operator this definition is unambiguous.
Please check the wait event expression syntax section of the documentation for more information on the syntax.
- keep_force - 'Y' or 'N': an option to FORCE a job to look at its own keep-clause so if for example an entire tree is deleted, jobs which have this FORCE clause and whose keep-clause is not yet expired will be 'detached' automatically
- submit_frame_status - a comma-delimited list of all status codes where this job should be resubmitted according to the specified submit frame, for example "C,E,K,U,A", meaning:
- 'C' - for status 'COMPLETED'
- 'E' - for status 'ERROR'
- 'K' - for status 'KILLED'
- 'U' - for status 'UNKNOWN'
- 'A' - for status 'CANCELED'
note
Status is only evaluated when a job reaches a final state. Since the 'file' state is an exceptional case, you should restrict the submit_frame_status to contain a subset of the statuses 'U', 'C', 'E', 'K' and 'A'.
- returncode_map_to_completed - a comma delimited list of return codes or ranges of return codes of OS jobs that will map to the COMPLETED status. For example, -3,6,10-16,120 which means 0 to 3, 10 to 16, and 120 to infinity.
- pin_to_parent_scheduler - 'Y' or 'N': an option to FORCE a job to run on the same scheduler as its parent job
- application_partition - the partition of the application this script belongs to
- format_partition - the partition of the format used for the job output
- lock_partition - the name of the lock that must be obtained before the job can actually start running
- queue_partition - the name of the queue in which the job must be executed
- time_window_partition - the partition of the time window during which the job must be executed
- resource_partition - the partition of the resource specifying which process server cluster must be used for the job execution
- scripttype_partition - partition of the scripttype used, if any
- os_user - name of the OS user whose credentials will be used for running the script
- allow_destination - defines if the output can be sent to a destination
- reset_statistics - defines if the script statistics are reset
- max_priority - the maximum priority of a job, where 1 is the minimum and 100 the maximum
- no_full_text_search - defines if the output is used for full text search
- no_triggers - defines if ON_JOB_STATUS_CHANGE triggers are used
- no_statistics - defines if the script statistics will be updated
- no_wait - defines if jobs of this script can be waited for
- optional_sf - optional_submit_frame 'Y' or 'N': if a submit frame is defined you can choose a different submit frame at submit time ('Y') or force the pre-defined submit frame ('N')
- submit_frame_partition - the partition of the submit frame used to repeat the job
- submit_frame_name - the name of the submit frame used to repeat the job
See Also
plsqlTopic
onsiteTopic