Redwood Documentation

Product Documentation

 

›JCS_ODF Package

RunMyJobsPL/SQL API

Views

  • rs_all_registry_keys
  • rs_all_triggers
  • rs_applications
  • rs_credentials
  • rs_credential_users
  • rs_dba_jobs
  • rs_dba_job_parameters
  • rs_dba_role_privs
  • rs_dba_scripts
  • rs_destinations
  • rs_directories
  • rs_enabled_triggers
  • rs_events
  • rs_files
  • rs_formats
  • rs_format_upload_extensions
  • rs_index_types
  • rs_jobs
  • rs_job_definitions
  • rs_job_locks
  • rs_job_notes
  • rs_job_parameters
  • rs_job_statuses
  • rs_job_wait_events
  • rs_locks
  • rs_object_types
  • rs_operator_messages
  • rs_partitions
  • rs_protocols
  • rs_queues
  • rs_queue_schedulers
  • rs_registry_keys
  • rs_resources
  • rs_roles
  • rs_schedulers
  • rs_scheduler_file_events
  • rs_scheduler_parameters
  • rs_scheduler_queues
  • rs_scheduler_resources
  • rs_scripts
  • rs_scripttype_schedulers
  • rs_script_calls
  • rs_script_call_parameters
  • rs_script_locks
  • rs_script_parameters
  • rs_script_postconditions
  • rs_script_raise_events
  • rs_script_source
  • rs_script_stats
  • rs_script_steps
  • rs_script_step_postconditions
  • rs_script_wait_events
  • rs_submit_frames
  • rs_submit_frame_elements
  • rs_timezones
  • rs_time_windows
  • rs_time_window_elements
  • rs_users
  • rs_user_roles

JCS Package

  • Package jcs summary
  • jcs.add_job_lock
  • jcs.add_job_note
  • jcs.add_job_raise_event
  • jcs.add_job_wait_event
  • jcs.change_password
  • jcs.clear_event
  • jcs.clear_parameters
  • jcs.close
  • jcs.current_job
  • jcs.current_job_id
  • jcs.def_date
  • jcs.def_num
  • jcs.def_str
  • jcs.def_tstamp
  • jcs.delete_job
  • jcs.detach_child
  • jcs.disable_trigger
  • jcs.drop_user
  • jcs.enable_trigger
  • jcs.errorfile
  • jcs.explain_job_status
  • jcs.format_error_stack
  • jcs.generated_user
  • jcs.get_credential_password
  • jcs.get_current_user
  • jcs.get_date_timezone
  • jcs.get_default_partition
  • jcs.get_setuser
  • jcs.get_starttime
  • jcs.is_event_raised
  • jcs.job_parameter
  • jcs.job_pin_to_scheduler
  • jcs.job_status
  • jcs.job_statuscode
  • jcs.job_statuscode_wait
  • jcs.job_status_wait
  • jcs.last_job_id
  • jcs.multiple_values
  • jcs.no
  • jcs.open
  • jcs.operator_message
  • jcs.operator_reply
  • jcs.oracle_date_format
  • jcs.oracle_tstamp_format
  • jcs.outputfile
  • jcs.output_parameter
  • jcs.parameter
  • jcs.parent_job_id
  • jcs.raise_event
  • jcs.read
  • jcs.readfile
  • jcs.remove_job_wait_event
  • jcs.reschedule
  • jcs.return_code
  • jcs.run
  • jcs.search
  • jcs.searchfile
  • jcs.setchild
  • jcs.setpassword
  • jcs.setuser
  • jcs.set_current_job_status
  • jcs.set_date_timezone
  • jcs.set_default_partition
  • jcs.set_job_format
  • jcs.set_job_name
  • jcs.set_text_mode
  • jcs.submit
  • jcs.subscriber_info
  • jcs.ts_sort
  • jcs.use_known_password
  • jcs.wait
  • jcs.waitforone
  • jcs.yes

JCS_CHAIN Package

  • Package jcs_chain summary
  • jcs_chain.job_add_call

JCS_EVENT Package

  • Package jcs_event summary
  • jcs_event.event_comment
  • jcs_event.event_file
  • jcs_event.event_scheduler

JCS_ODF Package

  • Package jcs_odf summary
  • jcs_odf.alter_application
  • jcs_odf.alter_credential
  • jcs_odf.alter_event
  • jcs_odf.alter_format
  • jcs_odf.alter_lock
  • jcs_odf.alter_partition
  • jcs_odf.alter_queue
  • jcs_odf.alter_queue_scheduler
  • jcs_odf.alter_resource
  • jcs_odf.alter_scheduler
  • jcs_odf.alter_scheduler_file_event
  • jcs_odf.alter_scheduler_queue
  • jcs_odf.alter_script
  • jcs_odf.alter_submit_frame
  • jcs_odf.alter_time_window
  • jcs_odf.begin_transaction
  • jcs_odf.commit_transaction
  • jcs_odf.create_application
  • jcs_odf.create_credential
  • jcs_odf.create_event
  • jcs_odf.create_format
  • jcs_odf.create_lock
  • jcs_odf.create_partition
  • jcs_odf.create_queue
  • jcs_odf.create_queue_scheduler
  • jcs_odf.create_resource
  • jcs_odf.create_scheduler
  • jcs_odf.create_scheduler_file_event
  • jcs_odf.create_scheduler_queue
  • jcs_odf.create_scheduler_resource
  • jcs_odf.create_scheduler_scripttype
  • jcs_odf.create_script
  • jcs_odf.create_script_pcd
  • jcs_odf.create_script_step
  • jcs_odf.create_script_step_pcd
  • jcs_odf.create_submit_frame
  • jcs_odf.create_submit_frame_element
  • jcs_odf.create_time_window
  • jcs_odf.create_time_window_element
  • jcs_odf.ddl_trigger
  • jcs_odf.describe_into_table
  • jcs_odf.drop_application
  • jcs_odf.drop_credential
  • jcs_odf.drop_event
  • jcs_odf.drop_format
  • jcs_odf.drop_lock
  • jcs_odf.drop_monitor
  • jcs_odf.drop_partition
  • jcs_odf.drop_queue
  • jcs_odf.drop_queue_scheduler
  • jcs_odf.drop_resource
  • jcs_odf.drop_scheduler
  • jcs_odf.drop_scheduler_file_event
  • jcs_odf.drop_scheduler_queue
  • jcs_odf.drop_scheduler_resource
  • jcs_odf.drop_scheduler_scripttype
  • jcs_odf.drop_script
  • jcs_odf.drop_scripttype
  • jcs_odf.drop_submit_frame
  • jcs_odf.drop_submit_frame_element
  • jcs_odf.drop_time_window
  • jcs_odf.drop_time_window_element
  • jcs_odf.get_transaction_id
  • jcs_odf.rollback_transaction
  • jcs_odf.set_transaction_id

JCS_PRIV Package

  • Package jcs_priv summary
  • jcs_priv.delete_priv
  • jcs_priv.execute_priv
  • jcs_priv.insert_priv
  • jcs_priv.schema_application
  • jcs_priv.schema_code
  • jcs_priv.schema_credential
  • jcs_priv.schema_destination
  • jcs_priv.schema_directory
  • jcs_priv.schema_event
  • jcs_priv.schema_file
  • jcs_priv.schema_format
  • jcs_priv.schema_job
  • jcs_priv.schema_lock
  • jcs_priv.schema_monitor
  • jcs_priv.schema_partition
  • jcs_priv.schema_queue
  • jcs_priv.schema_registry
  • jcs_priv.schema_resource
  • jcs_priv.schema_scheduler
  • jcs_priv.schema_script
  • jcs_priv.schema_scripttype
  • jcs_priv.schema_submit_frame
  • jcs_priv.schema_time_window
  • jcs_priv.select_priv
  • jcs_priv.subscribe_priv
  • jcs_priv.update_priv

JCS_REGISTRY Package

  • Package jcs_registry summary
  • jcs_registry.check_key_id
  • jcs_registry.CURRENT_USER_PRF
  • jcs_registry.get_raw_key
  • jcs_registry.get_repos_parameter
  • jcs_registry.get_value
  • jcs_registry.key_path
  • jcs_registry.path_exists
  • jcs_registry.PUBLIC_PRF
  • jcs_registry.ROOT_CURRENT_USER
  • jcs_registry.ROOT_PUBLIC
  • jcs_registry.ROOT_USER

JCS_SNMP

  • Package jcs_snmp summary
  • jcs_snmp.generate_trap
  • jcs_snmp.sendtrap

TIME Package

  • Package time summary
  • time.calc_subfr
  • time.calc_win
  • time.timestamp_in_new_tz
← jcs_odf.alter_scheduler_queuejcs_odf.alter_submit_frame →

on-site-related topic PL/SQL API jcs_odf.alter_script

Summary

  • procedure alter_script(owner in varchar2, name in varchar2, description in varchar2, application in varchar2, parameters in varchar2, format_name in varchar2, queue_name in varchar2, time_window_name in varchar2, resource_name in varchar2, priority in number, verify in varchar2, restart_unknown in varchar2, restart_error in varchar2, restart_killed in varchar2, account in varchar2, keep_versions in number, keep_per_user in varchar2, keep_until in varchar2, lock_name in varchar2, exclusive_execution in varchar2, overdue in varchar2, restart_completed in varchar2, comment_text in varchar2, nocompile in varchar2, version in number, force in varchar2, restart_count in number, status_on_submit in varchar2, use_directory in varchar2, use_context_defaults in varchar2, lightweight in varchar2, keep_type in varchar2, optional_tw in varchar2, keep_status in varchar2, scripttype_name in varchar2, eval_text in varchar2, event_expression in varchar2, keep_force in varchar2, submit_frame_status in varchar2, returncode_map_to_completed in varchar2, pin_to_parent_scheduler in varchar2, application_partition in varchar2, format_partition in varchar2, lock_partition in varchar2, queue_partition in varchar2, time_window_partition in varchar2, resource_partition in varchar2, scripttype_partition in varchar2, os_user in varchar2, allow_destination in varchar2, reset_statistics in varchar2, max_priority in number, no_full_text_search in varchar2, no_triggers in varchar2, no_statistics in varchar2, no_wait in varchar2, optional_sf in varchar2, submit_frame_partition in varchar2, submit_frame_name in varchar2) ( Parameter parameters is unsupported. Parameter verify is unsupported. Parameter restart_unknown is unsupported. Parameter restart_error is unsupported. Parameter restart_killed is parameter unsupported. Parameter account is unsupported. Parameter keep_until unsupported. Parameter exclusive_execution is unsupported. Parameter restart_completed is unsupported. Parameter nocompile is unsupported. Parameter force is unsupported. Parameter use_directory is unsupported. Parameter use_context_defaults is unsupported. Parameter lightweight is unsupported. Parameter optional_tw unsupported. Parameter eval_text unsupported. Parameter event_expression unsupported. Parameter keeforce unsupported. Parameter pin_to_parent_scheduler unsupported. Parameter lock_partition unsupported. Parameter os_user unsupported. Parameter allow_destination unsupported. Parameter no_full_text_search parameter unsupported. Parameter no_triggers unsupported. Parameter submit_frame_partition . Parameter submit_frame_name unsupported. Parameter optional_sf unsupported. Parameter no_statistics unsupported. Parameter no_wait unsupported.)

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:
  1. If E is an event then raised(E) is an event-expression
  2. If E is an event then israised(E) is an event-expression
  3. If X is an event-expression, then (X) is an event-expression
  4. If X and Y are event-expressions, then (X AND Y) is an event expression
  5. If X and Y are event-expressions, then (X OR Y) is an event expression
  6. 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

  • jcs_odf.create_script
  • jcs_odf.drop_script

plsqlTopic

onsiteTopic

← jcs_odf.alter_scheduler_queuejcs_odf.alter_submit_frame →
  • Summary
  • Specification
  • Parameters
  • See Also
Docs
Getting StartedInstallationFinance InstallationConcepts
TroubleshootingArchiving
Learn and Connect
Support Portal
BlogEventsResources
ISO/ IEC 27001 Information Security Management
Automate to be human

2023 All Rights Reserved |

Terms of Service | Policies | Cookies | Glossary | Third-party Software | Contact | Copyright | Impressum |