Tuesday, 21 January 2025

How NDM (Connect:Direct) can be used within an Ab Initio graph for file transfer.

Scenario:

  • Source System: Mainframe
  • Target System: UNIX server
  • Use Case: Transfer a file from the mainframe to the UNIX system after data processing in Ab Initio.

Steps in Ab Initio Graph with NDM Integration

1. Ab Initio Graph Design:

  • Components Used:
    • Input File Component: Reads the file to process.
    • Transform Component: Applies necessary transformations.
    • Output File Component: Writes the processed data to a local file.
    • Run Program Component: Executes the NDM script to transfer the file.

2. Example Graph Flow:

[Input File] -> [Transform] -> [Output File] -> [Run Program (NDM)]

3. Sample NDM Script:

This script is stored as a .ndm file and is executed via the Run Program Component.

NDM Script Example:

NDM_TRANSFER PROCESS COPY FROM ( DSN=source_file_name DISP=SHR NODE=MAINFRAME_NODE ) TO ( DSN=/data/target_directory/target_file_name DISP=RPL NODE=UNIX_NODE ) RUN TASK AFTER SUCCESS PEND

4. Run Program Component in Ab Initio:

This component is used to trigger the NDM script.

Run Program Configuration:

  • Command: Call the NDM script using the shell.
    c:DIRECT/bin/directcli -f /scripts/ndm_transfer.ndm
  • Parameters:
    • Path to the NDM script (/scripts/ndm_transfer.ndm).
    • Additional arguments if needed.

5. Error Handling in the Graph:

  • Use Conditional Components or check NDM logs to validate the transfer.
  • Example: Monitor the output log from the NDM process to confirm success or trigger alerts on failure.

Sample Workflow Execution:

  1. Input File: The source file is read from the mainframe.
  2. Processing: The data is transformed in Ab Initio.
  3. Output File: Processed data is written to a local directory on the ETL server.
  4. NDM Transfer:
    • The Run Program Component triggers the NDM script.
    • The file is securely transferred to the target system (UNIX server).
  5. Post-Transfer: Logs are checked to verify successful completion.

Benefits of This Integration:

  1. Automation: File transfer is seamlessly part of the ETL process.
  2. Error Recovery: NDM supports checkpoint/restart for interrupted transfers.
  3. Scalability: Suitable for large file transfers and cross-platform integration.
  4. Security: Uses encrypted protocols for secure file movement.

No comments:

Post a Comment

how to create dml dynamically in Ab-initio

 $[ begin let int i = 0; let string(int) complete_list = "emp_nm,billable,age,designation,location"; let string(int) file_content ...