I hear you. I thought sockets were esoteric. It is trivial, too trivial*, to write two socket programs and get two computers talking to each other.
*Too trivial in that you can get going while ignoring certain error and security considerations that might ultimately be important. > socket calls are built into the C language Yes and no. Yes, I think it is fair to say that sockets/TCP, C and UNIX all grew up together. Sockets seem to me to be most at home in C. No, in that C has a very different philosophy from Rexx or COBOL. Rexx has SAY. COBOL has WRITE. C "has" nothing like that. C does not even "have" a character string move instruction. All of those things are accomplished with standard format library calls. That is both good and bad. On the one hand it adds a layer of complexity (you can't SAY, you have to call printf()) and on the other hand a layer of simplicity (less language to learn). Ditto for sockets: it's all standard library calls. You can interface to and from C from almost any other language. C is so universal that every problem like that has probably been solved. And again, I am not "selling" C. C has some horrible flaws: a too-appealing ability to write inscrutable code, and some open invitations to horrible security exposures. (Not exposures in C itself, but a trivial ability to create your own exposures using C.) Sockets are pretty fundamental. Whatever your favorite language it should be fine for getting started with sockets. I used a PC Rexx (Regina?) at one point that that was totally satisfactory, and that I assume had socket support (I did not use it). FWIW, my intro to OOP was C#, which is actually a Java derivative. It precludes many of the bad habits one can get into as a C++ programmer, but if you learn C# then it is easy to get from there to C++ or Java. VS Code is a great IDE, includes C# and C/C++ and many other languages, and is totally, absolutely free. https://code.visualstudio.com/ I think there may be free plugins for "mainframe" languages and development. Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Bob Bridges Sent: Wednesday, January 5, 2022 9:57 AM To: [email protected] Subject: Re: Sockets? If you don’t understand the question then it's doubtless because I don't either. Let me explain more fully, and maybe it'll show what part of my ignorance needs to be filled in, so to speak. I'm familiar with a number of 3GL programming languages, but even after I learned about sockets (from studying and using the REXX calls mentioned below) I pictured sockets as something exotic and complicated happening below my grasp, in the bowels of the OS; I needed (so I thought) an interface to connect to them. (This is why I mentioned assembler earlier.) Thus the value of the REXX functions for sockets; it enabled me to get to them. My assumption was therefore that if I'm trying to implement some socket communications on my PC, TSO-REXX wouldn't meet my need and I'd have to write in a different language -- VBSCript, say -- and for that would need a different set of function calls, designed not for REXX but for something else, either for VBS specifically or something more general that object-oriented languages could use. I guess you're saying below that socket calls are built into the C language, or more likely are part of a standard library of C functions. I once bought a C compiler, but was dismayed by the amount of code that has to go into every program just to get started. (I'm prejudiced by the simplicity of REXX and PL/1, and dislike all the verbiage that's necessary even to start a COBOL program.) So I dropped the matter and never got further. No doubt I'll get back to C eventually. Meanwhile, is there a OO class (for example) that can interact with object-oriented languages such as VBS, Jscript, ooREXX etc? Or is it time for me to buy a C compiler (again). Or maybe VB Studio, or whatever it's called? (I don't really care for VB as a language; I love it in one way because it's the language in which I first finally got what OO programming is about, but I recognize that there must be languages that do the same thing more easily. Is it time for me to acquire and learn Perl? Python? Ruby? Java?) ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
