Creating a started task for the SQL DI application
After you have successfully installed and configured SQL Data Insights (SQL DI), consider running the application as a z/OS® started task. You can quickly create a started task by customizing the SQLDAPPS sample JCL job.
Before you begin
- Plan, install, and configure SQL DI as described in Preparing for SQL DI installation and Installing, configuring, and starting SQL DI.
Procedure
- Locate the following files in the $SQLDI_INSTALL_DIR/templates/started-task-samples directory on the z/OS system where your SQL DI runs:
- SQLDAPPS (sample JCL job)
- SQLDSTRT-STDPARM.template (sample MVS data set content)
- SQLDSTOP-STDPARM.template (sample MVS data set content)
- stdenvs-STDENV.template (sample z/OS Unix text file content)
- Copy SQLDAPPS into a data set in your PROCLIB concatenation, such as SYS1.PROCLIB, and customize them based on your system environment.
- Define a new MVS data set to be used by ddname STDPARM.
- Create member SQLDSTRT for SQLDAPPS by copying the following lines from SQLDSTRT-STDPARM.template:
PGM /usr/lpp/IBM/db2sqldi/v1r1/tools/bin/bash /usr/lpp/IBM/db2sqldi/v1r1/sql-data-insights/bin/sqldi.sh start - Create member SQLDSTOP for SQLDAPPS by copying the following lines from SQLDSTOP-STDPARM.template:
PGM /usr/lpp/IBM/db2sqldi/v1r1/tools/bin/bash /usr/lpp/IBM/db2sqldi/v1r1/sql-data-insights/bin/sqldi.sh stop - If necessary, replace the default
/usr/lpp/IBM/db2sqldi/v1r1segment in each directory path with $SQLDI_INSTALL_DIR where your SQL DI is installed.
- Create member SQLDSTRT for SQLDAPPS by copying the following lines from SQLDSTRT-STDPARM.template:
- Create a new z/OS Unix text file
stdenvsto be used by ddnameSTDENV.You can use the same
STDENVfile for all your SQL DI started tasks.- Copy the following lines from stdenvs-STDENV.template:
_BPXK_AUTOCVT=ON SQLDI_INSTALL_DIR=/usr/lpp/IBM/db2sqldi/v1r1 BLAS_INSTALL_DIR=/usr/lpp/cbclib SQLDI_HOME=/path/to/sqldi-home SPARK_HOME=/usr/lpp/IBM/db2sqldi/v1r1/spark24x SPARK_CONF_DIR=/path/to/sqldi-home/spark/conf JAVA_HOME=/java8_64/J8.0_64 PATH=/bin:/usr/lpp/IBM/db2sqldi/v1r1/tools/bin:/java8_64/J8.0_64/bin LIBPATH=/lib:/usr/lib:/java8_64/J8.0_64/bin/classic:/java8_64/J8.0_64/bin/j9vm: /java8_64/J8.0_64/lib/s390x:/java8_64/J8.0_64/lib:/usr/lpp/cbclib/lib IBM_JAVA_OPTIONS="-Dfile.encoding=UTF-8" _ENCODE_FILE_NEW=ISO8859-1 _ENCODE_FILE_EXISTING=UNTAGGED _CEE_RUNOPTS="FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)" SQLDI_SERVICE_ONLY=TRUE - If necessary, replace the default
/usr/lpp/IBM/db2sqldi/v1r1segment in each directory path with $SQLDI_INSTALL_DIR where your SQL DI is installed. - If necessary, replace the default /usr/lpp/cbclib segment in each directory path with $BLAS_INSTALL_DIR where the IBM® OpenBLAS is installed.
- If necessary, set
SQLDI_SERVICE_ONLYto a different value or remove the variable.TheSQLDI_SERVICE_ONLYvariable controls whether invoking the SQL DI started task will automatically start the Spark cluster. Setting the variable toTRUEspecifies that the Spark cluster will not be automatically started when the SQL DI started task is invoked. Setting it to any other value, includingFALSEorNULL, or omitting it specifies that invoking the SQL DI started task will start both the SQL DI application and the Spark cluster. However, the start of the cluster in this case will not appear as part of any started task. See Creating started tasks for the Spark cluster for related information. - Set all environment variables based on your z/OS system environment and your SQL DI installation. See Configuring setup user ID for SQL DI for instructions.
- Copy the following lines from stdenvs-STDENV.template:
- Define a RACF® profile for the new SQLDAPPS started task and assign <sqldi_setup_userid> as the owner by issuing the following commands:
RDEFINE STARTED SQLDAPPS.* STDATA(USER(<sqldi_setup_userid>) GROUP(SQLDIGRP)) SETROPTS RACLIST(STARTED) REFRESH - Run the SQLDAPPS started task to start the SQL DI application as shown in the following example:
/S SQLDAPPS - If necessary, run the SQLDAPPS started task to stop the UI services by issuing the following command:
/S SQLDAPPS,OPTION=’SQLDSTOP’The
OPTIONvalue is case-sensitive. Make sure that you issue the command in your SDSF system command extension to retain the lower case of your input.