Solved

Communicating between an OpenVMS and Windows via an IPDaemon FTP Server?

Posted on 2011-03-05
4
497 Views
Last Modified: 2012-05-11
I have two applications; an application on an OpenVMS system the other on a Windows PC. The OpenVMS application would execute TCPIP/DCL commands to the Windows application. The windows application is coded with VS2010 C++ and IPWorks V5.

The problem:  perform work on OpenVMS then using a DCL command, wake up the PC client application and finish the work on the PC.

FTP and TELNET are the options to communicate with the PC application. I am considering creating an embedded FTP server in the Windows application, associate a task to a file name and do work when an empty file is received on the FTP server.  This approach isn't elegant but appears very functional as I could, from the OpenVMS system,  transfer any number of files, each associated with a dedicated PC task. If you have a better approach, please send it along.

IPWorks Help, embed IPDaemon in my C++ Windows app. Let me know your thoughts on the approach. If you have example code you can forward, it would be very much appreciated.

Current tools available,  IPWorks V5 C++, IPWorks V8 .Net.

Many thanks!

Tim
0
Comment
Question by:TimPeer
  • 2
  • 2
4 Comments
 
LVL 40

Expert Comment

by:noci
ID: 35048314
Ok,

You can better wait for a connect on the windows system. (listen...).
On VMS you can use TELNET /CREATE to create a TNAnnnn device you can use to send command through to the remote system.

The TNAnnnn device can be opened using OPEN/READ/WRITE lnm TNAnnnn
and you can send data using WRITE lnm "xxxx"
etc.

This is much less overhead.
0
 

Author Comment

by:TimPeer
ID: 35048872
Interesting. Would I create a Telnet Server listener in my Windows C++ application? I understand the Telnet create.. but am confused on what I should be checking on the Windows side. Last night located an FTP server written in C++ which was being integrated to the app. A telnet solution would seem to be a better / cleaner solution. Can you offer more details of the process with more detail on the windows side?

Many thanks!
0
 
LVL 40

Accepted Solution

by:
noci earned 500 total points
ID: 35055240
The C-RTL has a set of routines (socket(), bind(), listen(), read(), write(), close(), setsocketopt())
to manage a link.

The flow is like:
s = socket(....);    // create a socket
bind(s,.....);         // set listening port
while (1) {
    c = listen(2)          // wait for connection, with room to receive 2 simultaneous req.
    read(c,....)           // read/write (sync, for simple signaling server)
    write(c,.....)         // respond with a reply
    close(c);             // bye bye...
}

For windows there should be more or less equivalent calls.
close(s);         // when the server shuts...
0
 

Author Closing Comment

by:TimPeer
ID: 35114677
I located an example listener. Thanks NOCI!

Tim
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now