This forum has been disabled. Please visit our new Help Desk at help.jitterbit.com

Send Command over FTP

Questions and answers for configuring and deploying your integrations.

Send Command over FTP

Postby dhoechst on Mon Nov 09, 2009 9:11 am

Is there any way to send a custom command over FTP? I'm trying to do an integration where after moving data to our AS400, I need to run a program. The AS400 FTP server allows me to run a program by sending the command: QUOTE RCMD SBMJOB...

Can execute this type of command in an FTP connection?
dhoechst Bookmark and Share
Support Subscriber
Support Subscriber
 
Posts: 83
Joined: Wed Jan 24, 2007 10:07 am

Re: Send Command over FTP

Postby emanuel on Mon Nov 09, 2009 3:55 pm

No, sending ftp quote commands is not possible.

/Cheers
Emanuel
emanuel Bookmark and Share
Jitterbit Hero
Jitterbit Hero
 
Posts: 1320
Joined: Mon Feb 13, 2006 12:16 pm
Location: Alameda, CA

Re: Send Command over FTP

Postby dhoechst on Mon Nov 09, 2009 4:36 pm

I was able to call a program using DbExecute, but not execute a command. Since I couldn't directly execute a command, I ended up writing a CL program that can be called by a DbExecute from Jitterbit that then runs the commands I need on our AS400.
dhoechst Bookmark and Share
Support Subscriber
Support Subscriber
 
Posts: 83
Joined: Wed Jan 24, 2007 10:07 am

Re: Send Command over FTP

Postby emanuel on Mon Nov 09, 2009 5:03 pm

Ok, you could presumably also do it in a plugin, but your solution may be just as easy.

/Emanuel
emanuel Bookmark and Share
Jitterbit Hero
Jitterbit Hero
 
Posts: 1320
Joined: Mon Feb 13, 2006 12:16 pm
Location: Alameda, CA

Re: DBexecute & Iseries

Postby MikeyS on Thu Aug 25, 2011 8:13 am

Hello,
I'm attempting to call a CL program on the iseries.
Does anyone have an example of DBexecute and iSeries calling a program?

Thank you.
M
MikeyS Bookmark and Share
Community Newbie
Community Newbie
 
Posts: 2
Joined: Thu Aug 25, 2011 7:53 am

Re: Send Command over FTP

Postby dhoechst on Thu Aug 25, 2011 1:01 pm

Sure, I just created a Script in Jitterbit that I add to the end of my operation

DbExecute("<TAG>Database</TAG>",'Call LIB.PGM')

Note that I'm using the "." instead of standard iSeries "/".

The CL can do what ever you need it to.
dhoechst Bookmark and Share
Support Subscriber
Support Subscriber
 
Posts: 83
Joined: Wed Jan 24, 2007 10:07 am

Re: Send Command over FTP

Postby MikeyS on Fri Aug 26, 2011 6:58 am

Thanks. I did get it working so here is an example with Parms
DbExecute("<TAG>iseries DB driver connection</TAG>", "CALL Lib.pgm ('N', '2', '20110826', '1415')")

I would like to know if it's possible to pass parameters into the DBexecute on the Call from another process. Has anyone done this?
DbExecute("<TAG>iseries DB driver connection</TAG>", "CALL Lib.pgm ('N', 'parm1', 'parm2', '1415')")
any help would be appreciated.
MikeyS Bookmark and Share
Community Newbie
Community Newbie
 
Posts: 2
Joined: Thu Aug 25, 2011 7:53 am

Re: Send Command over FTP

Postby dhoechst on Fri Aug 26, 2011 8:29 am

I think you could put it into a variable and then include the variable in your DbExecute. Use the $ symbol to identify variables in scripts.

Assign values to your variables like this in your transformation. (You would use values from your transformation instead of hard coded.)
$parm1 = "2";
$parm2 = "20110826";

You'd then build your command:
DbExecute("<TAG>iseries DB driver connection</TAG>", "CALL Lib.pgm ('N','" + $parm1 + "','" + $parm2 + "', '1415')")
dhoechst Bookmark and Share
Support Subscriber
Support Subscriber
 
Posts: 83
Joined: Wed Jan 24, 2007 10:07 am


Return to Using Jitterbit


SourceForge.net Logo  open source integration