Package jcs Summary

on-site-related topic

The jcs package is the primary runtime package which contains procedures for submitting and manipulating jobs, as well as other objects.

Transaction Keywords

Transaction keywords indicate when a change made by a procedure or function gets committed to the database.

The following transaction keywords are used in the jcs package:

Autonomous <condition>

When the <condition> holds, or when no <condition> is specified, the JCS call does its work in an autonomous transaction. It has no influence on the caller's transaction. If successful the work done by the API call is committed and cannot be rolled back.

Blocks <condition>

The JCS call does its work by sending a message to a database Platform Agent, and waits for that Platform Agent to return a completion message. It has no influence on the caller's transaction. If successful the work done by the API call is committed and cannot be rolled back.

Can_commit

The JCS call will commit if the 'can_commit' parameter is 'Y' (see 'commit') and just modify the database if it is 'N' (see 'database_modified').

Can_commit_autonomous

The JCS call will do its work in an autonomous transaction if the 'can_commit' parameter is 'N' (see 'autonomous') and just commit the database changes directly if 'can_commit' is 'Y' (see 'commits').

Commits <condition>

When the <condition> holds, or when no <condition> is specified, the JCS call updates the database directly and commits the changes. If successful the work done by the API call is committed and cannot be rolled back.

Database_modified <condition>

When the <condition> holds, or when no %lt;condition> is specified, the JCS call updates the database. The caller can decide to commit or rollback the changes.

Network_agent

The JCS call does its work by sending a message to a network Platform Agent and waiting for a reply. It has no influence on the caller's transaction, as no work is done in the current session.

Submit_buffer

The JCS call does its work by storing all modifications in a temporary table. This temporary data is changed into database updates when the caller calls jcs.submit or jcs.run.

The following table contains the list of all functions and procedures of the jcs package.

jcs.add_job_lock Make a job synchronize on an additional lock.
jcs.add_job_note Add a note (small comment) to a job that can be read by all users.
jcs.add_job_raise_event Make a job raise an additional event on a particular status.
jcs.add_job_wait_event Make a job wait on an additional event.
jcs.change_password Change the stored password for this user, and if desired the ORACLE password as well.
jcs.clear_event Clear an event, so that it can be raised again.
jcs.clear_parameters Clears the submit buffer and prepares for submitting a new job.
jcs.close Release a filehandle.
jcs.current_job Returns information about the current job.
jcs.current_job_id Return the ID of the current job.
jcs.def_date def_date is used to set date arguments to their default value if you cannot use a variable argument list.
jcs.def_num def_num is used to set number arguments to their default value if you cannot use a variable argument list.
jcs.def_str def_str is used to set varchar2 arguments to their default value if you cannot use a variable argument list.
jcs.def_tstamp def_tstamp is used to set timestamp arguments to their default value if you cannot use a variable argument list.
jcs.delete_job Delete the repository information and the output and log files of a job.
jcs.detach_child Detach a child job from the current job.
jcs.disable_trigger Remove a trigger.
jcs.drop_user Drops the (redwood) user or role identified by username, which effectively means that all its privileges are dropped, possibly including the Oracle user and privileges attached to that.
jcs.enable_trigger Add an existing procedure as an enabled trigger.
jcs.errorfile Returns the name of the error-file of the job.
jcs.explain_job_status Give explanation of why job has current status and not in any other.
jcs.format_error_stack Returns the last ORACLE or JCS error generated by the API.
jcs.generated_user Check if the current user is a redirected user
jcs.get_credential_password Get the (encoded) password for a given credential. You need to provide a full key and you need to have access to the credential.
jcs.get_current_user Returns the same value as the Oracle function USER, but in a more efficient manner (it does not use a SQL statement every time).
jcs.get_date_timezone Returns in which timezone date parameters are interpreted
jcs.get_default_partition Get the default Partition for this user.
jcs.get_setuser Get username that was used to override the requestor for whom jobs are to be submitted using jcs.setuser.
jcs.get_starttime Determine a good starttime for a job with Submit Frame/Time Window combination
jcs.is_event_raised Get the status of an event.
jcs.job_parameter
jcs.job_pin_to_scheduler Force the job that is being submitted to run on a specific scheduler, also referred to as pin to scheduler or force scheduler.
jcs.job_status Returns the status of a job.
jcs.job_status_wait Wait until the indicated job is in a finished state and return the job's status.
jcs.job_statuscode Returns the statuscode of a job.
jcs.job_statuscode_wait Wait until the indicated job is in a finished state and return the job's statuscode.
jcs.last_job_id Returns the ID of the last job that was submitted using jcs.submit or jcs.run.
jcs.multiple_values Create an array of numbers in the internal representation.
jcs.no no can be specified as a value in yes/no (truth) style parameters.
jcs.open Get a filehandle for an OS file, with jcs.open, to use in the read, search or close calls
jcs.operator_message Send a notice (message) to the operator or ask the operator a question.
jcs.operator_reply Send a reply to someone's jcs.operator_message call.
jcs.oracle_date_format Given an input format stored for a date script parameter, gives the Oracle date format representing that date format.
jcs.oracle_tstamp_format Given an input format stored for a timestamp script parameter, gives the Oracle date format representing that date format.
jcs.output_parameter Returns the value of an output parameter.
jcs.outputfile Returns the name of the output-file of the job.
jcs.parameter
jcs.parent_job_id Return the ID of the parent of the current job.
jcs.raise_event Raise an event, releasing all jobs that are waiting for this event.
jcs.read Returns a line of text from the indicated filehandle.
jcs.readfile Returns a line of text from the indicated file.
jcs.remove_job_wait_event Remove a job wait on an event.
jcs.reschedule Edit, kill, abort or restart the job.
jcs.return_code Return the numerical value returned by the job when it finished or was killed.
jcs.run Schedule a job execution of a script, in a separate transaction.
jcs.search Given a filehandle (and optionally a starting-line) find the first line which matches the given pattern.
jcs.searchfile Given a filename (and optionally a starting-line) find the first line which contains the given pattern.
jcs.set_current_job_status Set the end status for the current job.
jcs.set_date_timezone Define in which timezone date parameters are interpreted. If the value is never set, date parameters are interpreted in the timezone of the database host (this is the 'compatible' setting).
jcs.set_default_partition Set the default Partition for this user.
jcs.set_job_format Set the format of job that is to be submitted to a different format than originally defined at script level.
jcs.set_job_name Set the name of job that is going to be submitted.
jcs.set_text_mode Set translation options for jcs.readfile.
jcs.setchild Tells the Process Server that the following request for the execution of the destination script is a special request: it depends on the output of the job with the given job_id. The Process Server delays execution of the destination until the parent job is finished.
jcs.setpassword Set the password for the user set with jcs.setuser, or if this is not set, the logged in user.
jcs.setuser Override the requestor for whom jobs are to be submitted.
jcs.submit Schedule a job execution of a script.
jcs.subscriber_info Get user attributes such as address and email.
jcs.ts_sort This call can be used to convert a date value to a number value that is suited to be compared against one of the performance columns (named *_sort) in rs_jobs or rs_operator_messages.
jcs.use_known_password Use the password already stored in the repository.
jcs.wait Wait for child job(s) to finish.
jcs.waitforone Wait until any child job is in a finished state and return the job's ID.
jcs.yes yes can be specified as a value in yes/no (truth) style parameters.