I want to compare two txt files through datastage server edition on windows, Can I know how can I do that?
I tried to use following code -
cmd = "FC E:\DataStageQa\ndw\work\stagingx\25\DEPLETF E:\DataStageQa\ndw\work\stagingx\25\DEPLETF"
CALL DSExecute("NT", cmd, ScreenOutput, SystemReturnCode)
looks like it's not working.
Thanks.
How to compare two files in windows through datastage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
What precisely do you mean by "not working"?
Does it work in a DOS (CMD) shell?
Try putting double quotes around both pathnames, and enclosing the entire command in single quotes.
Does it work in a DOS (CMD) shell?
Try putting double quotes around both pathnames, and enclosing the entire command in single quotes.
Code: Select all
cmd = 'FC "E:\DataStageQa\ndw\work\stagingx\25\DEPLETF" "E:\DataStageQa\ndw\work\stagingx\25\DEPLETF" '
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
TEST #1
*******
Arg1 = d:\datastage\data\india1\sachin\out\new7.txt
Arg2 = d:\datastage\data\india1\sachin\out\new71.txt
Test completed.
DSLogWarn called from : ExecDOS
Message to be logged is...
> Error when executing command: FC d:\datastage\data\india1\sachin\out\new7.txt d:\datastage\data\india1\sachin\out\new71.txt
> *** Output from command was: ***
> Comparaison des fichiers D:\DATASTAGE\DATA\INDIA1\SACHIN\OUT\new7.txt et D:\DATASTAGE\DATA\INDIA1\SACHIN\OUT\NEW71.TXT
> ***** D:\DATASTAGE\DATA\INDIA1\SACHIN\OUT\new7.txt
> 2,3,"new2"
> 2,3,"new312"
> ***** D:\DATASTAGE\DATA\INDIA1\SACHIN\OUT\NEW71.TXT
> 2,3,"new2"
> 2,3,"new3"
> *****
>
>
Result = 1
sorry in previous post both file were same, extremely sorry.
*******
Arg1 = d:\datastage\data\india1\sachin\out\new7.txt
Arg2 = d:\datastage\data\india1\sachin\out\new71.txt
Test completed.
DSLogWarn called from : ExecDOS
Message to be logged is...
> Error when executing command: FC d:\datastage\data\india1\sachin\out\new7.txt d:\datastage\data\india1\sachin\out\new71.txt
> *** Output from command was: ***
> Comparaison des fichiers D:\DATASTAGE\DATA\INDIA1\SACHIN\OUT\new7.txt et D:\DATASTAGE\DATA\INDIA1\SACHIN\OUT\NEW71.TXT
> ***** D:\DATASTAGE\DATA\INDIA1\SACHIN\OUT\new7.txt
> 2,3,"new2"
> 2,3,"new312"
> ***** D:\DATASTAGE\DATA\INDIA1\SACHIN\OUT\NEW71.TXT
> 2,3,"new2"
> 2,3,"new3"
> *****
>
>
Result = 1
sorry in previous post both file were same, extremely sorry.