Skip to Content

How to read data from a text file in BODS with out using file formats?

Hi,

I have a scenario to write a script to read data from text file , if the text file have value 1 then job should be execute else raise exception.

Please give me inputs.

Thanks,

Chandra

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Apr 05, 2016 at 11:13 AM

    Hi @chandra koduri,

    You can use the exce function to achieve this.

    Let us assume you have a status_file.txt. Here am creating a small batch script as "status_read.bat". This batch will read the file.

    @echo off

    cls

    cd C:\Users\boproject2\Desktop

    type status_file.txt

    echo.

    echo.

    exit

    Am calling the above batch script ("status_read.bat") in the Data Services Script.

    By using the Global Variable we can capture status_file.txt data (Make sure you follow the scripting rules and use the escape characters in the Script).

    Output:

    Regards:

    Akhilesh Kiran.


    6.png (20.3 kB)
    7.png (3.2 kB)
    8.png (7.7 kB)
    Add comment
    10|10000 characters needed characters exceeded