Examples of Command Uses
This section provides examples of commands that can be defined using the New Command window.
To copy a file from one environment to another use the following command:
copy_client_client
Command Steps:
ksc_connect_dest_client if [ ! d [P.P_SUB_PATH] ]; then mkdir -p [P.P_SUB_PATH]; fi ksc_exit ksc_copy_client_client SUB_PATH="[P.P_SUB_PATH]" FILENAME="[P.P_FILENAME]" FILE_TYPE="[P.P_FILE_TYPE]"
To automatically update the staffing profile status to "In Planning," use the following command:
Update Staffing Profile Status
Command Steps:
ksc_set_staffing_profile_status USE_NAMES_FLAG="N" STAFF_PROF_IDS="[REQ.P.KNTA_STAFFING_PROFILE]" STATUS_NAME="In Planning"
To execute Oracle� SQL script against an Oracle Database using JDBC, use the following command:
Execute SQL
Command Steps:
ksc_run_java com.kintana.core.server.execution.KSCSQLQuery jdbc:oracle:thin:@[ENV="[ENV_NAME]".DB_NAME]: [ENV="[ENV_NAME]".DB_PORT_NUMBER]: [ENV="[ENV_NAME]".DB_ORACLE_SID] [ENV="[ENV_NAME]".DB_USERNAME] "[ENV="[ENV_NAME]".DB_PASSWORD]" "[QUERY_STRING]" -token SQL_OUTPUT -delimiter "~" -file [AS.PKG_TRANSFER_PATH][SYS.USER_ID].txt [EXCEPTION_OPTION]
To log a program issue using a request type, use the following command:
ksc_store
Command Steps:
ksc_store KNTA_ESCALATION_LEVEL="PROGRAM", "Program"
To run a report using UNIX, use the following command:
Run report.
Command Steps:
ksc_local_exec [AS.ORACLE_HOME]/bin/[AS.SQLPLUS] [AS.DB_USERNAME]/[AS.DB_PASSWORD]@[AS.DB_CONNECTION_STRING] @./scripts/kntarpt_special_com "[AS.REPORT_DIR]" "[RP.FILENAME]" "[P.P_FROM_COM]" "[P.P_TO_COM]" "[P.P_SHOW_REF]"
To run a report using Windows�, use the following command:
Run report.
Command Steps:
ksc_local_exec [AS.ORACLE_HOME]/bin/[AS.SQLPLUS] [AS.DB_USERNAME]/[AS.DB_PASSWORD]@[AS.DB_CONNECTION_STRING] @./scripts/kntarpt_special_com '[AS.REPORT_DIR]' '[RP.FILENAME]' '[P.P_FROM_COM]' '[P.P_TO_COM]' '[P.P_SHOW_REF]' ksc_run_java com.kintana.core.server.execution.CvtFileNameToLowerCaseCommand "[AS.REPORT_DIR][RP.FILENAME].html"