Db2

 View Only
  • 1.  DMC 3.1.5.1

    Posted Wed October 13, 2021 10:56 PM
    In this latest release, shell scripts were added to the types of jobs that can be submitted by the job manager

    In Data server manager, the variable ${DSWEB_DATABASE_PROFILENAME} provided the name of the DB2 connection that activated a particular shell script, so that script could determine the calling server, DB2 instance and database name.

    This Variable does not appear to be provided in DMC 3.1.5.1

    Below is a cut down shell script job that was run in Data Server Manager with 2 input connections attached to the job and the resulting log file output

    #!/usr/bin/ksh

    DATE=$(date +"%Y-%m-%d-%H.%M.%S")

    CONNECTION_NAME=${DSWEB_DATABASE_PROFILENAME}

    LOGFILE_DIR=/home/dasusr/logs/

    if [[ ! -e $LOGFILE_DIR ]]
    then
    mkdir $LOGFILE_DIR
    fi

    LOGFILE=${LOGFILE_DIR}${CONNECTION_NAME}.${DATE}

    echo ${CONNECTION_NAME} > ${LOGFILE}

    exit 0

    root@rhlinux1.settersnest.com:/home/dasusr/logs $ cat RHLINUX1_DB2INST1_DB2INST1.2021-10-14-11.20.59
    RHLINUX1_DB2INST1_DB2INST1
    root@rhlinux1.settersnest.com:/home/dasusr/logs $ cat RHLINUX1_DB2INST2_DB2INST2.2021-10-14-11.21.14
    RHLINUX1_DB2INST2_DB2INST2
    root@rhlinux1.settersnest.com:/home/dasusr/logs $

    ------------------------------
    Andrew Finlaison
    ------------------------------

    #Db2


  • 2.  RE: DMC 3.1.5.1

    Posted Tue February 15, 2022 03:11 AM
    Hello  Andrew,
    Thanks for your feedback. We'll discuss with the team to consider enhancing it.

    Thanks.

    ------------------------------
    Tao Wen
    ------------------------------