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
 

 

Connect Direct

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
João Mukuno

New User


Joined: 25 May 2011
Posts: 2
Location: Brazil

PostPosted: Wed May 25, 2011 10:59 pm    Post subject: Connect Direct
Reply with quote

Hello All,

I would like to know if is possible to run a *.bat file in a Windows server using connect direct from mainframe. I don't know if I use a RUN TASK or a RUN JOB or which command to use or how can I start this *.bat file.

If does anybody know how to do please send me solution please.

If I was not clear please reply that I will try to explain again !!

Oh, I almost forgot... I tried this command below but I does not have success (The SNODE was defined before in signon process):

Code:
STEP1     RUN TASK (PGM="TEST") SNODE       -                           
          SYSOPTS=\'CMD(G:\\TSTFOL\\TST\\TEST.BAT) DESKTOP (YES)'\   


Thanks a Lot !!!
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed May 25, 2011 11:03 pm    Post subject: Reply to: Connect Direct
Reply with quote

It depends.

Quote:

The Run Task statement calls external programs to run on a Connect:Direct node. The Process waits
until the external program completes before continuing. When the external program completes, the
Run Task returns a completion code that indicates program success. This completion code can be
used by subsequent Process conditional statements.

The Run Job statement executes external programs or commands to run on a Connect:Direct node.
These programs run concurrently with the Process. Unlike the Run Task statement, the Process does not wait for the program to finish.
When the Run Job statement completes, it returns a completion code. This completion code
indicates the success of the Run Job statement, and not the success of the program or command.


My personal preference is to not use either, but to rely on the job scheduling system to handle such a task. Since you want to run a command, from what I know, RUN JOB is your only option.
Back to top
View user's profile Send private message
João Mukuno

New User


Joined: 25 May 2011
Posts: 2
Location: Brazil

PostPosted: Tue Jun 14, 2011 10:09 pm    Post subject: Connect Direct Solution - worked with a different way
Reply with quote

Hello all,
First I would like to thanks Mr. Superk for the support and his idea...
Superk I read your message but I did the solution with another way...

Well I will Explain what I did.
I used a RUN TASK and it works fine.

First I asked to Windows responsible to configure the proxy from his side to accept my user to run the process in the windows side (This is necessary or you do not have access to run anything there).
Second I used the PGM instead CMD and did a different command as I will show below:

Code:

RUN TASK (PGM=WINNT)                                         -
SYSOPTS="PGM(TEST.BAT)" SNODE                                 


I saw in C:D guide that is necessary to know if the windows is 95 or NT in my case the windows is a windows server, but it is not a problem because windows server is like a Windows NT, this is to explain the use of the parameter (PGM=WINNT) if it was windows 95 the parameter should be (PGM=WIN95).
In the parameter SYSOPTS I used as parameter only the name of the ".bat" file once that the path just configured previously in the server.
the SNODE were configured previously in the SIGNON defining with the main path of the server in my case is a website ("SNODE=TCPNAME=WEBSITE.COM HOLD=NO").

Well I think that's all.
I hope that all this explanation has been helpful.

Thanks a lot again !!!!
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 -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DIrect link of dynam/nodynam nkjain87 COBOL Programming 2 Mon Apr 24, 2017 6:23 pm
No new posts Connect:Direct - RC=000000FF MSG=SVTM... R.Manivannan All Other Mainframe Topics 3 Fri Apr 21, 2017 1:30 am
No new posts DB2 CONNECT query mistah kurtz DB2 3 Fri Jul 15, 2016 6:37 pm
No new posts Help Needed with View Direct shailesh_do CA Products 2 Wed Jul 13, 2016 10:39 am
No new posts Connect Direct details shankarm IBM Tools 2 Sat Feb 20, 2016 7:25 pm


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