SAP CCDSNU_JCL_GET_STATUS Function Module for Asynch. JCL Job submission: Check Job status









CCDSNU_JCL_GET_STATUS is a standard ccdsnu jcl get status SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Asynch. JCL Job submission: Check Job status processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for ccdsnu jcl get status FM, simply by entering the name CCDSNU_JCL_GET_STATUS into the relevant SAP transaction such as SE37 or SE38.

Function Group: S_CCDSNU_DB2
Program Name: SAPLS_CCDSNU_DB2
Main Program: SAPLS_CCDSNU_DB2
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function CCDSNU_JCL_GET_STATUS pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'CCDSNU_JCL_GET_STATUS'"Asynch. JCL Job submission: Check Job status
EXPORTING
* JOB_ID = "Field Type INT, Length 4
* FORCED_TSOUSER = "z/OS user ID
* SP_JOB_ID = "z/OS JES Job ID
* FORCE_ADMIN_SP = ABAP_FALSE "
* REMOTE_DBCON = "Logical name for a database connection

IMPORTING
JOB_STATUS = "DSNACCJP: Status of the JCL Job
NO_SPOOL_FILES = "Natural number
RETCODE = "Return code of stored procedure
MESSAGE = "Area of the CC stored procedures output values

EXCEPTIONS
NOT_AUTHORIZED = 1 ENCRYPT_USER_FAILED = 10 DECRYPT_PASSW_FAILED = 11 JOB_ID_UNKNOWN = 12 NO_TSO_USER = 13 ERROR_IN_CHECK_VERSION = 2 LESS_THAN_V8 = 3 STOPROC_ABORTED = 4 DSNACCJQ_NOT_INSTALLED = 5 CREATE_DATABASE_FAILED = 6 NO_INPUT_TABLES = 7 SQL_ERROR = 8 JOB_HELD = 9
.



IMPORTING Parameters details for CCDSNU_JCL_GET_STATUS

JOB_ID - Field Type INT, Length 4

Data type: DB2INT4
Optional: Yes
Call by Reference: No ( called with pass by value option)

FORCED_TSOUSER - z/OS user ID

Data type: DB2CCUID
Optional: Yes
Call by Reference: No ( called with pass by value option)

SP_JOB_ID - z/OS JES Job ID

Data type: DB2JESJOBID
Optional: Yes
Call by Reference: No ( called with pass by value option)

FORCE_ADMIN_SP -

Data type: ABAP_BOOL
Default: ABAP_FALSE
Optional: Yes
Call by Reference: No ( called with pass by value option)

REMOTE_DBCON - Logical name for a database connection

Data type: DBCON_NAME
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for CCDSNU_JCL_GET_STATUS

JOB_STATUS - DSNACCJP: Status of the JCL Job

Data type: DB2CCJOBSTATE
Optional: No
Call by Reference: Yes

NO_SPOOL_FILES - Natural number

Data type: INT4
Optional: No
Call by Reference: Yes

RETCODE - Return code of stored procedure

Data type: DB2CCRETURN
Optional: No
Call by Reference: Yes

MESSAGE - Area of the CC stored procedures output values

Data type: DB2CCMTXT
Optional: No
Call by Reference: Yes

EXCEPTIONS details

NOT_AUTHORIZED - Authorization profile S_DB2_DBADM needed to execute

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ENCRYPT_USER_FAILED - Encryption of TSO-user name failed

Data type:
Optional: No
Call by Reference: Yes

DECRYPT_PASSW_FAILED - Decryption of TSO-passwd failed

Data type:
Optional: No
Call by Reference: Yes

JOB_ID_UNKNOWN - Parameter JOB_ID is not found in JES

Data type:
Optional: No
Call by Reference: Yes

NO_TSO_USER - Invoking user has not saved his TSO profile in DB2J

Data type:
Optional: No
Call by Reference: Yes

ERROR_IN_CHECK_VERSION - Error in Function DBSYCHK_COMPARE_VERSION

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

LESS_THAN_V8 - The DB version is less than V7.1 => DSNACCOR is not available

Data type:
Optional: No
Call by Reference: Yes

STOPROC_ABORTED - Call of stored procedure didn't work

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

DSNACCJQ_NOT_INSTALLED - DSNACCJQ is not found in SYSIBM.SYSROUTINES

Data type:
Optional: No
Call by Reference: Yes

CREATE_DATABASE_FAILED - Creation of TEMP database or tablespace failed.

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

NO_INPUT_TABLES - The required global temp tables are not installed.

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

SQL_ERROR - EXEC SQL resulted in error.

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

JOB_HELD - Job is in INPUT or HOLD state for more than an hour

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for CCDSNU_JCL_GET_STATUS Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lv_job_id  TYPE DB2INT4, "   
lv_job_status  TYPE DB2CCJOBSTATE, "   
lv_not_authorized  TYPE DB2CCJOBSTATE, "   
lv_encrypt_user_failed  TYPE DB2CCJOBSTATE, "   
lv_decrypt_passw_failed  TYPE DB2CCJOBSTATE, "   
lv_job_id_unknown  TYPE DB2CCJOBSTATE, "   
lv_no_tso_user  TYPE DB2CCJOBSTATE, "   
lv_forced_tsouser  TYPE DB2CCUID, "   
lv_no_spool_files  TYPE INT4, "   
lv_error_in_check_version  TYPE INT4, "   
lv_retcode  TYPE DB2CCRETURN, "   
lv_sp_job_id  TYPE DB2JESJOBID, "   
lv_less_than_v8  TYPE DB2JESJOBID, "   
lv_message  TYPE DB2CCMTXT, "   
lv_force_admin_sp  TYPE ABAP_BOOL, "   ABAP_FALSE
lv_stoproc_aborted  TYPE ABAP_BOOL, "   
lv_remote_dbcon  TYPE DBCON_NAME, "   
lv_dsnaccjq_not_installed  TYPE DBCON_NAME, "   
lv_create_database_failed  TYPE DBCON_NAME, "   
lv_no_input_tables  TYPE DBCON_NAME, "   
lv_sql_error  TYPE DBCON_NAME, "   
lv_job_held  TYPE DBCON_NAME. "   

  CALL FUNCTION 'CCDSNU_JCL_GET_STATUS'  "Asynch. JCL Job submission: Check Job status
    EXPORTING
         JOB_ID = lv_job_id
         FORCED_TSOUSER = lv_forced_tsouser
         SP_JOB_ID = lv_sp_job_id
         FORCE_ADMIN_SP = lv_force_admin_sp
         REMOTE_DBCON = lv_remote_dbcon
    IMPORTING
         JOB_STATUS = lv_job_status
         NO_SPOOL_FILES = lv_no_spool_files
         RETCODE = lv_retcode
         MESSAGE = lv_message
    EXCEPTIONS
        NOT_AUTHORIZED = 1
        ENCRYPT_USER_FAILED = 10
        DECRYPT_PASSW_FAILED = 11
        JOB_ID_UNKNOWN = 12
        NO_TSO_USER = 13
        ERROR_IN_CHECK_VERSION = 2
        LESS_THAN_V8 = 3
        STOPROC_ABORTED = 4
        DSNACCJQ_NOT_INSTALLED = 5
        CREATE_DATABASE_FAILED = 6
        NO_INPUT_TABLES = 7
        SQL_ERROR = 8
        JOB_HELD = 9
. " CCDSNU_JCL_GET_STATUS




ABAP code using 7.40 inline data declarations to call FM CCDSNU_JCL_GET_STATUS

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
 
 
 
 
 
 
 
 
 
 
 
 
 
DATA(ld_force_admin_sp) = ABAP_FALSE.
 
 
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!