?
Solved

How to receive and send data from ICF AS400 file in VB, C# or C++

Posted on 2011-05-04
6
Medium Priority
?
2,445 Views
Last Modified: 2013-11-13
Hi,
We have to make a program in windows to comunicate with an existing RPGLE program in AS400, this program uses an ICF file.
I know there are better ways to do this, but this is an existing program and we need to send a receive data from Windows through an AS400 ICF file.
Can you share an example in VB, VB .Net, C# or C++?
0
Comment
Question by:mrangelahumada
  • 2
  • 2
  • 2
6 Comments
 
LVL 27

Expert Comment

by:tliotta
ID: 35700320
I haven't thought about this at all yet, so I don't have a suggested solution for the question that you asked. I'll try to look into it later.

However, the first thought that came to mind was to create a "proxy" program on your AS/400. Route the ICF communication back into the same AS/400 into the new "proxy" program. It could do ICF I/O as middleware with sockets on the other side of the proxy to your VB, C# or C++ programming.

Just a brainstorming thought.

Tom
0
 

Author Comment

by:mrangelahumada
ID: 35700879
Thanks Tom,

We already have a solution as you suggested and it works well, but we need to avoid adding variables to the environment.

We have a windows based middleware that establishes links between many platforms, it allows us to consolidate the different platforms we have.

That's why we need to send data and receive data between the windows based middleware and an AS400 ICF file.

Regards,

mrangel
0
 
LVL 36

Expert Comment

by:Gary Patterson
ID: 35702608
First of all, from IBM's perspective, SNA (and hence the component protocols like APPN, APPC), is functionally dead as a wire-level protocol.

ICFF (Inter-system Communication Function Files) provide a file-style interface to APPC programming, designed to make APPC communications programs easier to use from file-oriented programming languages like RPG.  So, the fact that the AS/400 program uses and ICF file isn't really very relevant.  The key for you is that you want to write an APPC program from Windows.

Back in 1998, Chris Peters wrote this book.  I edited it for Midrange Computing, and I had a copy lying around that I can't find at the moment.  I am relatively certain that it had a chapter on APPC in VB.  That said, I'm not sure that IBM delivers the required PC libraries for APPC any more, which really raises the bar on this kind of programming task, unless you really have a good grasp of low-level APPC implementation details.

Microsoft has a product, call Host Integration Server (HIS) that, at least in the past offered APPC programming interfaces.  I'm not sure if the latest version of HIS (2010) offers the APPC interfaces or not.  You can find the HIS documentation on the MSDN web site.  There is an open standard API called CPI-C that can be used for APPC communications.  MS HIS implements this API.

IBM supplies a Java implementation of CPI-C as part of their Personal Communications product, and used to supply it as part of SecureWay Communications Server, but I don't know if either are available any more.  Haven't had to do any CPIC/APPC/ICF coding for a long time.

http://publib.boulder.ibm.com/infocenter/pcomhelp/v5r9/index.jsp?topic=/com.ibm.pcomm.doc/books/html/client_server31.htm

I like Tom's idea of  proxy or gateway program.  Write an AS/400 RPG (or whatever) program that uses ICF to interface with your existing ICF application.  You might even be able to harvest code from the existing application's partner transaction program.  Then fit whatever interface you like onto the other end of this new program: TCP sockets, data queue, MQ series, JMS, database file import/export, etc:

Existing RPGLE Application
                  |
                ICFF
                  |
New RPGLE App
                  |
Sockets / Data queue / MQ / JMS
                  |
Windows Program

Note that it is very easy to use an AS/400 data queue from both RPG (QSNDDTAQ and QRCVDTAQ API) RPGLE and from VB, VB.NET, and C#.NET.  MS Supplies a Data Queue API in HIS, and IBM supplies a (Free!) data queue interface in JTOpen (Java Toolbox) and as part of the IBM Access for i (Client Access the us old-timers) program that ships with every AS/400.

RPGLE: http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?topic=%2Fapis%2FExTaskDataque.htm
VB: http://www.redbooks.ibm.com/redbooks/pdfs/sg245183.pdf

- Gary Patterson


0
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
LVL 36

Accepted Solution

by:
Gary Patterson earned 2000 total points
ID: 35702622
0
 
LVL 27

Expert Comment

by:tliotta
ID: 35702946
Do you already have Windows APPC capability?

Tom
0
 

Author Closing Comment

by:mrangelahumada
ID: 35706775
Thanks Gary,

This is the solution we need, I'm going to order the book immediately.

Kind regards,

mrangel
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses
Course of the Month16 days, 15 hours left to enroll

864 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