Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [CASE-OPENED] Command Task in Iway Data Migrator

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CASE-OPENED] Command Task in Iway Data Migrator
 Login/Join
 
Member
posted
Hi All,

I need to invoke a batch script from Iway Data Migrator Process flow. How can I achieve this? Kindly help me with your suggestions.

Thanks,
Balaji

This message has been edited. Last edited by: <Kathryn Henning>,
 
Posts: 11 | Registered: November 06, 2013Report This Post
Member
posted Hide Post
I have done this by creating a WF stored procedure (.fex) with the following code,
This sample code passes one variable to the .bat script. The script needs to be in
the location path specified in the call command.

-TYPE **************************************************************************
-TYPE CSV FILE NAME: &CSV_FILE
-DOS CALL "e:\ibi\apps\lps_ch_upload\TRANSFER_FILES\ZipCSV.bat" &CSV_FILE E:\ibi\apps\lps_ch_upload\TRANSFER_FILES, E:\ibi\apps\lps_ch_upload\TRANSFER_FILES;
-RUN
-TYPE END OF JOB
-TYPE **************************************************************************


I then create a Data Migrator FLOW that calls this WF stored proc (that way
the results go to the ETLLOG, which includes any PRINT statements from the .bat script).
The FLOW that calls it will pass in the desired csv_file value.

If you don't have a parameter in your .bat file, just leave it off the call command;
or, if you have multiple parameters, just list them all at the end of the call command
(in the expected order by the .bat script, there are NO commas between parm values).

Hope this helps.
 
Posts: 8 | Registered: May 24, 2012Report This Post
Member
posted Hide Post
Hi Sharon,

This is the code I have used in my procedure

-TYPE

-DOS CALL "C:\Users\bnagaraj\Desktop\xyz.bat"


-RUN


- TYPE END OF JOB

And this is the content of my xyz.bat file
echo Test write >> xyzwrite.txt


When I run this in a process flow I am getting the message mentioned below.

DEP_0: procedure command_test_proc started.
C:\ibi\DEVSTU~1\srv77\wfs\edatemp\ts000011>echo Test write 1>>xyzwrite.txt
END OF JOB
(ICM18039) DEP_0 command_test_proc Return Code = 0

My procedure executed successfully and the batch file is invoked.
But the file xyzwrite.txt is not created in the directory where xyz.bat is located.

I tried this too. But it didnt work.
-RUN
DOS C:\Users\bnagaraj\Desktop\xyz.bat
-RUN
-END


Please tell me what is the problem here.

Thanks

Balaji
 
Posts: 11 | Registered: November 06, 2013Report This Post
Guru
posted Hide Post
If you don't specify a directory in your output redirection the file will be written to the current directory. In the case of an agent running on our server that's a temporary directory.

Try putting the following command at the end of your focexec and you should see your file name in the log.
!dir

However temporary directories (such as ts000011) are (by default) automatically deleted when the flow completes. That's so that another flow that uses the same agent (and thus directory) wouldn't find files left behind.

Try writing your file out to a more permanent location.

This message has been edited. Last edited by: Clif,


N/A
 
Posts: 397 | Location: New York City | Registered: May 03, 2007Report This Post
Member
posted Hide Post
Clif,

I tried using !dir command at the end.
But when I run it, I am getting the same message.
And my batch file is not in the temp folder.It is located in the C:\Users\Username\Desktop directory. So it will create a file named xyzwrite.txt in the same directory . It is working fine when I run the batch file from cmd.
But I am getting this message when I invoke the batch script from procedure.
 
Posts: 11 | Registered: November 06, 2013Report This Post
Guru
posted Hide Post
Please open a case with hotline; they will be better able to assist you.


N/A
 
Posts: 397 | Location: New York City | Registered: May 03, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [CASE-OPENED] Command Task in Iway Data Migrator

Copyright © 1996-2020 Information Builders