cancel
Showing results for 
Search instead for 
Did you mean: 

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

chandrasekhar6
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

akhileshkiran
Contributor
0 Kudos

Hi ,

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.

chandrasekhar6
Participant
0 Kudos

Hi Kiran,

Thanks for response

can you please explain how to using the Global Variable we can capture status_file.txt.


Thanks,

Chandra



akhileshkiran
Contributor
0 Kudos

Hi

I the above logic i Used $G_CMD(Global Variable) to capture the data from the batch.script

Regards,

Akhilesh Kiran.

Answers (0)