Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 8551
Location: Dubuque, Iowa, USA

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: 8795
Location: Welsh Wales

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: 8795
Location: Welsh Wales

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: 2473
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 Identify the count from two diffrent ... UmashankarSubramani DFSORT/ICETOOL 19 Sat Jul 11, 2020 4:35 am
No new posts Need to open a DSN using REXX & e... Y Marwaha CLIST & REXX 10 Fri Jun 05, 2020 7:30 pm
No new posts Execute Partially Edited Rexx Exec fr... AllenSieracki CLIST & REXX 14 Tue Jun 02, 2020 7:56 pm
No new posts How to Assign a Function key to Mainf... upendrasri TSO/ISPF 4 Sat May 30, 2020 9:03 pm
No new posts Mainframe ISPREDIT Macro query upendrasri TSO/ISPF 3 Wed May 27, 2020 1:12 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us