Functions
JCL functions are organized into Categories and Subcategories. Browsing the taxanomy of available functions will provide a good overview of the functionality provided by the module.
System Functions
System functions provide a broad range of capabilities. Generally these functions are used to configure the behavior of JCL and are used to query the module for the current system configuration and status. Simple jobs may only use one or two initialization functions and the exit function, but many more functions are available which allow jobs of almost any level of complexity to be built.
-
sys_set_email_levels
-
sys_set_mail_emailto
-
sys_get_db_paramsize
-
sys_set_db_paramsize
-
sys_check_dataenvr
-
sys_read_extra_init
-
sys_read_extra_val
-
sys_get_maxval
-
sys_set_maxval
-
sys_end
-
sys_get_script_file
-
sys_set_script_file
-
sys_set_conf_file
-
sys_get_user
-
sys_timer
-
sys_wait
-
sys_ctime2str
-
sys_disp_active_jobs
-
sys_disp_doc
-
sys_disp_pod_section
-
sys_require_pod_section
-
sys_get_commandline
-
sys_get_commandline_opt
-
sys_get_commandline_val
-
sys_get_commandline_yesno
-
sys_get_commandline_bool
-
sys_init_plugin
-
sys_get_path_plugin_dir
-
sys_set_path_plugin_dir
-
sys_info
-
sys_warn
-
sys_die
-
sys_error
-
sys_get_mail_server
-
sys_get_mail_from
-
sys_get_mail_emailto
-
sys_get_mail_email_levels
-
sys_get_console_levels
-
sys_set_console_levels
-
sys_set_verbose
-
sys_clear_verbose
-
sys_get_log_file
-
sys_get_log_filefull
-
sys_get_log_logging_levels
-
sys_get_log_console_levels
-
sys_get_log_gdg
-
sys_get_logging_levels
-
sys_set_logging_levels
-
sys_run_job
-
sys_run_job_background
-
sys_run_job_wait
-
sys_run_job_maxrc
-
sys_run_job_reset
-
sys_get_dbdescr
-
sys_get_dbinst
-
sys_get_dataenvr
Logging Functions
These functions handle log file content. Use these functions to put information into the job’s log file. Content is identified in the log file using the severity level indicated in the function name.
-
log_fatal
-
log_error
-
log_warn
-
log_info
-
log_debug
-
log_write_log
-
log_write_screen
Database Functions
These functions provide connectivity and database interface. The data query functions provide a large number of general purpose database management capabilities. Support for common DDL tasks is provided thru a standardized interface. Actual implementation of the tasks is performed by database stored procedures. These have been wrtten and are available for use with an Oracle database (contact the author for more information). Functions are also provided here for Oracle output, bulk load, and general stored procedure execution.
-
db_init
-
db_init_getval
-
db_init_setval
-
db_get_defenvr
-
db_connect
-
db_nil
-
db_finish
-
db_disconnect
-
db_prepare
-
db_execute
-
db_commit
-
db_get_sth
-
db_fetchrow
-
db_fetchrset
-
db_bindcols
-
db_error
-
db_rollback
-
db_rowcount_query
-
db_rowcount_table
-
db_delete
-
db_delete_insert
-
db_insert_from_file
-
db_insert_from_query
-
db_insert_from_conf
-
db_query_to_file
-
db_dump_query
-
db_dump_table
-
db_sanity_check
-
db_jcl_create_table
-
db_jcl_table_exists
-
db_jcl_analyze_table_compute
-
db_jcl_analyze_table_estimate
-
db_jcl_rename_table
-
db_jcl_truncate_table
-
db_jcl_drop_table
-
db_jcl_create_index
-
db_jcl_index_exists
-
db_jcl_create_unique_index
-
db_jcl_create_bitmap_index
-
db_jcl_add_constraint
-
db_jcl_enable_constraint
-
db_jcl_disable_constraint
-
db_jcl_drop_constraint
-
db_jcl_rename_index
-
db_jcl_drop_index
-
db_jcl_comment_on_table
-
db_jcl_get_table_comment
-
db_jcl_comment_on_view
-
db_jcl_get_view_comment
-
db_jcl_comment_on_column
-
db_jcl_get_column_comment
-
db_jcl_create_view
-
db_jcl_view_exists
-
db_jcl_drop_view
-
db_jcl_create_function
-
db_jcl_function_exists
-
db_jcl_drop_function
-
db_jcl_create_procedure
-
db_jcl_procedure_exists
-
db_jcl_drop_procedure
-
db_jcl_grant_permission
-
db_jcl_exchange_partition
-
db_func
-
db_func_in
-
db_proc
-
db_proc_in
-
db_proc_out
-
db_proc_inout
-
db_dbms_output_enable
-
db_dbms_output_disable
-
db_dbms_output_get
-
db_sqlloader
-
db_sqlloaderx
-
db_sqlloaderx_parse_logfile
-
db_sqlloaderx_read
-
db_sqlloaderx_skipped
-
db_sqlloaderx_rejected
-
db_sqlloaderx_discarded
-
db_sqlloaderx_elapsed_time
-
db_sqlloaderx_cpu_time
Utility Functions
These functions provided file access and string manipulation functions. If you are working with dates, you will find the Date Handling functions to be very useful. JCL allows you to store passwords either encrypted or unencrypted in the system data conf file. It is strongly recommended that you store all passwords in encrypted form. The Password functions below, along with the password management tools provided in the distribution will provide you with support for those tasks.
-
util_get_filename_load
-
util_get_filename_extr
-
util_get_filename_log
-
util_read_header
-
util_read_footer
-
util_read_file
-
util_write_header
-
util_write_footer
-
util_print_table
-
util_move
-
util_file_exists
-
util_get_footer_recordcount
-
util_get_file_recordcount
-
util_get_file_sizediff
-
util_trim
-
util_zsdf
-
util_yn2bool
-
util_bool2yn
-
util_normalize_path
-
util_sort_distinct
-
util_parse_datespec
-
util_is_date
-
util_encrypt_password
-
util_decrypt_password
FTP Functions
If you need to extract data out of your system and send it to another database system that only accepts file input, you can use the file transfer function to handle file transmit operations.
-
ftp_put