IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

execute a .bat program from mainframe via FTP


 
IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: :: View next topic  
Author Message
genyboy

New User


Joined: 24 Apr 2006
Posts: 2
Location: bahrain

PostPosted: Thu Aug 21, 2014 4:47 pm
Reply with quote

Hi.

I generate an input file from mainframe that is FTP-ed to a Windows server
for processing. Before processing in Windows Server, we manually run an
MD5-utility embedded in a DOS .bat program that would update the said
input file by creating a checksum record at the bottom of the file.

The input file is then ready for processing by the application in the Windows server. The checksum record is validated by the application before it proceeds to process the file.

I would like to check if there is a way to trigger a .bat program
while MF and Windows server are connected via FTP service so that
the manual trigger of .bat program can be automated. If no,
kindly suggest any work around.

Thanks.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8566
Location: Dubuque, Iowa, USA

PostPosted: Thu Aug 21, 2014 5:25 pm
Reply with quote

FTP is a File Transfer Protocol -- so it does not support execution of programs on the remote server. Under z/OS, you can use REXEC to execute a program on a remote server -- check with your site support group about the availability of REXEC at your site.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8793
Location: Welsh Wales

PostPosted: Thu Aug 21, 2014 5:30 pm
Reply with quote

Or your scheduling software may have the functionality to do this immediately following the FTP of the file
Back to top
View user's profile Send private message
genyboy

New User


Joined: 24 Apr 2006
Posts: 2
Location: bahrain

PostPosted: Thu Aug 21, 2014 6:54 pm
Reply with quote

Thanks for the quick replies.

Shop has no scheduling software as of now so this is not viable icon_sad.gif

As for REXEC, I am new to it and so not sure if it would work...
When I gave TSO REXEC in my MF system I got the following in my screen. So this could mean my mainframe system is REXEC ready. My doubt is, does the Windows Server have to have REXEC app installed too?

EZA4726I Usage: rexec -? -d -b <tab> -l <usr> -p <pwd> -n -m -s <port> -t <fn
> Fhost cmd
EZA4727I options: -
EZA4728I -? display this message.
EZA4729I -d turn on debug tracing.
EZA4814I -m prefix '09'x to machine control output.
EZA4811I -b <tab> specifies tab value,
EZA4813I valid range 1 - 12 (default 1).
EZA4730I -l <usr> specifies remote userid.
EZA4731I -p <pwd> specifies remote password.
EZA4732I -n prevent automatic login.
EZA4733I -s <port> specifies server port (default 512).
EZA4802I -t <fn> specifies translation table name.

EZA4734I Example: rexec -d -l guest -p guest hostname ls
***

Do we have a sample code/jcl here using REXEC?
Sorry for asking too much help....
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8793
Location: Welsh Wales

PostPosted: Thu Aug 21, 2014 7:05 pm
Reply with quote

Does google not work on your machine ?

If you issue the command via TSO then search the forum for batch TSO processing, there are loads of examples available
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2474
Location: Netherlands, Amstelveen

PostPosted: Thu Aug 21, 2014 7:35 pm
Reply with quote

If you are up to it, write a rexx sockets exec that will open a Telnet session and execute your command(s).
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> JCL & VSAM
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Forum Replies
This topic is locked: you cannot edit posts or make replies. Sample CICS Webservices Program CICS 1
No new posts Proc print in Mainframe All Other Mainframe Topics 4
No new posts Need opinion on mainframe to cloud mi... General Talk & Fun Stuff 4
No new posts Calling Rexx program from Cobol CLIST & REXX 12
No new posts How to define transaction that trigge... CICS 2

Back to Top