Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

execute a .bat program from mainframe via FTP

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: execute a .bat program from mainframe via FTP
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: 7909
Location: Bellevue, IA

PostPosted: Thu Aug 21, 2014 5:25 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Aug 21, 2014 5:30 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Aug 21, 2014 7:05 pm    Post subject:
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Thu Aug 21, 2014 7:35 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 2 Tue Dec 06, 2016 8:30 pm
This topic is locked: you cannot edit posts or make replies. Urgent Mainframe Requirments (2-10 yr... Shankar779 Mainframe Jobs 0 Sun Nov 27, 2016 1:48 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
This topic is locked: you cannot edit posts or make replies. Mainframe Developer requirement in Ku... capricorn Mainframe Jobs 0 Sun Oct 23, 2016 3:49 pm
No new posts A sample of exit program for exit XMN... lind sh CICS 2 Mon Oct 03, 2016 5:07 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us