Você está na página 1de 5

NDM Using UNIX Shell Script

05-March-2007

NDM Using UNIX Shell Script

Author: Sukalya

NDM Using UNIX Shell Script

05-March-2007

Table of Contents

1. Objective: ........................................................................................................................3 2. Features: ..........................................................................................................................3 3. Functionality: ..................................................................................................................3 4. Functional Specification:.................................................................................................3 5. Implementation:...............................................................................................................4 6. Additional Information About NDM :.............................................................................5

Author: Sukalya

NDM Using Unix Script

05-March-2007

1. Objective:
To develop an automated UNIX Script to transfer files from one server to another using NDM (Network Data Mover Connect Direct).

2. Features:
Network Data Mover (NDM) is one of the most popularly used methods to transfer files from one server to another. But it is often used only in Mainframe systems. This reusable tool, aims at incorporating NDM to transfer files from one server to another within an UNIX shell script. This script can be used to transfer files from one Unix Server to any other Server. This script is reusable.

3. Functionality:
The UNIX shell script inbuilt features of NDM (Connect Direct) to transfer the files from one server to another. The details such as the name & location of the file to be transferred, the server name, username & password to connect to the server should be provided in the script.

4. Functional Specification:
This document describes the process to NDM the files from one server to another. The following information are needed in order to run the script. Primary Node Name The hostname of the server from which the files need to be transferred. Primary Node User Name User name Primary Node Password Password Submitting node Name The hostname of the server to which the files need to be transferred. Submitting node ID- Username to connect to the Snode Submitting node Password Password

Note: If Primary node Name, User Name & Password are not provided, then by default the logged in user name & password values will be taken. If Submitting

Author: Sukalya

NDM Using Unix Script

05-March-2007

(Snode) node ID & Password are not mentioned explicitly, it takes the UserName & Password used to connect to Primary Node.

5. Implementation:
A UNIX shell script can be created with the above-mentioned functionality.

5.1 Functions of the Script In Detail:


1. 2. 3. 4. Read the required parameters. Submit the process. Copy the file from one server to another. End the Process.

5.2 Inputs:
1. 2. 3. 4. 5. 6. The NDM Config File Path Connect Direct Executable Path Path of the list file containing the details of files to be NDMed Target location Path Server Name (for Primary Node & Submitting Node) User Name & Password (for Primary Node & Submitting Node)

5.3 Pseudo code:


Begin Read the NDM config file path Read the Connect Direct executable path Read the path of the list file containing list of all the files to be NDMed Read the target location path Read the Server Name, User Name & Password to connect to it. Submit the process End

Author: Sukalya

NDM Using Unix Script

05-March-2007

5.4 Sample Code:


Please refer to the below attachment for the sample code:

C:\Docum ents and Settings\168761\Desktop\NDM_Using_Unix.txt

5.5 Output:
The files are compressed and a back up is taken in the specified path and the files will be deleted as per the user requirement.

6. Additional Information About NDM :


The NDM config file contains the details such as the protocol to be used to transfer the files. For example: TCP. It has authentication information & client key file information Primary Node : Its the server from which the files have to be transferred. Submitting Node Its the server to which the files have to be transferred. On executing the script, the process gets submitted to the Queue and it returns a process number using which we can track it state. The process can be in any one of the following states : Wait Execute Hold Once it enters the Queue, it will be in the wait state. Then it gets executed & if all the required parameters are resolved correctly then it enters the execute state and the files get transferred. If any of the parameters provided are wrong or some problem occurs then the job is put to Hold state. NDM provides the additional facility of tracking the Process once it is submitted. We can use the command given below to find its status: Select stat detail=yes pnumber=process_number Example: Select stat detail=yes pnumber=370

Author: Sukalya

Você também pode gostar