Fsr Scripts

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Fsr Scripts as PDF for free.

More details

  • Words: 808
  • Pages: 4
FSR Scripts

1

SCRIPTS gw_start_seq_tasks.sh This script is used to start the processing sequence as per the execution order list. It takes a parameter file as an input which contains the details about the parameters that are invoked in the session and workflow level. The execution order list will be cataloged in a separate file, named as ExecutionOrderList_.txt The server and database information is taken from Infa.txt that is placed in the PrmFiles directory. The P_SET_TASK_RUN_IND procedure from the PKG_GATEWAY package is called, which selects the next available task to be run. This sets the TASK_STATE_FLAG of the T_GW_STP_TASK_RUN table to ‘Y’, indicating that the particular task is currently running. Once the execution of the task is completed, the P_UNSET_TASK_RUN_IND procedure from the PKG_GATEWAY package is called, which updates the completed tasks as ‘N’ in the TASK_STATE_FLAG of the T_GW_STP_TASK_RUN table. This indicates that the execution of the particular task is completed and is free for allocation of a new run. The run status and the errors encountered are logged in every stage in a log file.

gw_start_single_task.sh This script is used to run a single workflow. It takes 3 input parameters 1. Directory name, where the workflow resides 2. Workflow 3. Parameter file name along with the directory path The script gives the status of the workflow (running or stopped or execution completed)

restart_workflow.sh This script is used to restart a workflow. This script is used in places where a re-run should be done. It takes 6 input parameters. 1. Folder name 2. Workflow name

FSR Scripts 3. 4. 5. 6.

2

System ID Interface ID Template ID PrcProcess ID

This script invokes gw_start_single_task.sh for a re-run of the same workflow, using the existing parameters.

start_workflow.sh This script is used to start the execution of workflows. The input parameters for this script are 1. Folder name 2. Time to keep the workflow in sleep state before the start of the workflow execution (in secs) 3. File with the workflow names to be executed. It gets the server and port details from the Infa.txt file Initially the wait period specified is taken into account and the workflow execution is kept on hold till the specified period. Once the sleep time is over, the execution of each and ever workflow specified in the file starts. Irrespective of the status of the previous workflow, all the workflow names specified in the file is started.

move_file.sh This script is used to move the files to a specified target directory. It takes 2 input parameters 1. Parameter file name containing details about the files to be moved. 2. Target directory to where the files are intended to move. The script takes the remote server and remote file details from the parameter file, and moves them to the specified target directory location.

portal_upload.sh This script is used to upload the files generated to the specified destination directory, through secure file transfer protocol. It takes 3 input parameters 1. Parameter file name along with its path 2. Destination directory 3. Source directory

FSR Scripts

3

The script gets the server and file details from the parameter file. Then it connects to the destination directory through sftp, and copies the source files to the target location defined. Once the files are copied, the file permissions are changed to 666 in the destination directory.

attach_and_send_mail.sh This script is used to send a file through email, to a list of user id’s defined in a group. It takes 3 input parameters 1. Parameter file name along with its path 2. Filename that has to be attached in the mail 3. Mail subject

add_timestmp.sh This script is used to append timestamp (system date) to the filename. It takes 2 input parameters 1. File name to which the timestamp needs to be attached 2. Folder name in which the file resides The timestamp that is appended is of YYYYMMDD_HHMMSS format.

gw_push_tlr_bw.sh This script is used to copy the TLR BW target files to the target (SAP) server. It also creates a parameter file that contains a list of files that has been pushed to the SAP server. It takes 4 input parameters 1. Parameter file that contains the SAP server details, along with the directory and file names that need to be pushed. 2. Input data file name, which needs to be renamed and pushed to the SAP server. 3. Input control file name, which needs to be renamed and pushed to the SAP server. 4. Output file name (need clarification on the contents and usage of this file) Queries: 1. Where are we calling the returnerror() function in this script. 2. Also, why is this command exit $? Specified in this returnerror() function. This will return a value 0, saying that the script completed successfully. So how do we predict that a failure has occurred?

FSR Scripts

4

Related Documents

Fsr Scripts
November 2019 14
Fsr
November 2019 7
Scripts
November 2019 27
Scripts
June 2020 14
Scripts
October 2019 32
Scripts
November 2019 27