× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Sockets Programming
  • From: Scott Klement <klemscot@xxxxxxxxxxxx>
  • Date: Fri, 15 Jun 2001 16:49:38 -0500 (CDT)


Hi,

On Fri, 15 Jun 2001, Chuck Morehead wrote:

> Does anyone know about any good tool kits for sockets programming on
> the AS/400?

Socket programming on AS/400 is pretty much exactly the same as it is
on UNIX, if you're working in ILE C.   For such a simple endevor, I 
hardly think you need a tool kit...

If you're trying to write your code in some other language, such as RPG,
however, it gets more difficult.  You didn't name a language, however. :(

> Here is the goal.  We have a process that creates spooled files.  
> These spooled files contain info that we want to send to another
> system.  The other system (UNIX) has an interface engine that will
> support parsing out the data, but requires that the info be sent on a
> specific port using TCP/IP.

IMHO, you're reinventing the wheel, here.   OS/400 natively supports
LPR which could be used to send the spooled data to the UNIX system's
LPD.

If you have misgivings about using LPR/LPD, another option would be to
look at lp5250d.   lp5250d is part of the open source TN5250 package
for Linux, BSD, etc that I've become a part of.   It uses IBM's tn5250e
prootcol to download spool files and convert them to a text file on the
Unix side.  

lp5250d can pipe it's output to any UNIX program or script.  (Normally,
one would pipe it to lpr, but you can really pipe it to anything)

If this interests you, take a look at http://tn5250.sourceforge.net

If you do decide to use sockets on the AS/400 side, you can probably find
a tutorial on the net somewhere that explains how to use BSD-compatable
sockets, and use them from the AS/400.

If you want to do them in RPG instead of C, take a look at the 
"Who Knew You could Do That in RPG IV" Redbook, and, try running a search
for "socket" in the Midrange.com archives.   I know that I've posted 
examples in RPG400-L over the years... I'm sure you can find them in
the archives.

Have fun!


+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.