• COBOL and socket io

    From SRSeedBurners@21:1/5 to All on Mon Dec 27 13:54:11 2021
    I have a test tool originally written in COBOL that I use to send transactions to our servers which is done via IPC. I now need to simulate sending transactions to our systems the same way outside vendors via a socket connection. I am not finding that
    COBOL supports tcpip socket io. If that is true, I was considering writing a C module to handle the tcpip and CALL'ing it from the COBOL test tool. However, I'm also finding Guardian COBOL does not support mixed language support as it does in OSS. So
    my only other option, re-write my test tool in C so I can use the Guardian socket library or move it to OSS and write an OSS C module and call it. Being a non-COBOL'er am I missing something?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bill Honaker@21:1/5 to SRSeedBurners on Mon Dec 27 18:13:03 2021
    On Mon, 27 Dec 2021 13:54:11 -0800 (PST), SRSeedBurners <sterlingranch@gmail.com> wrote:

    I have a test tool originally written in COBOL that I use to send transactions to our servers which is done via IPC. I now need to simulate sending transactions to our systems the same way outside vendors via a socket connection. I am not finding that
    COBOL supports tcpip socket io. If that is true, I was considering writing a C module to handle the tcpip and CALL'ing it from the COBOL test tool. However, I'm also finding Guardian COBOL does not support mixed language support as it does in OSS. So
    my only other option, re-write my test tool in C so I can use the Guardian socket library or move it to OSS and write an OSS C module and call it. Being a non-COBOL'er am I missing something?

    Not sure what led you to believe that mixed-language is not supported in Guardian Native compilers.

    Both the 'NonStop COBOL Manual for TNS/E and TNS/X Programs' and the 'C/C++ Programmer's Guide for NonStop Systems' say that both can be mixed.

    You can't use COBOL85, you have to use Native COBOL (ECOBOL or XCOBOL, depending on your system).
    You also have to use Native C (NMC or CCOMP, depending on your system). You will needt to use eld or xld to link them together.

    You could also do all builds in OSS, or on Windows using the cross compilers. All are documented in the manuals.

    Best of luck,
    Bill

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Keith Dick@21:1/5 to Bill Honaker on Mon Dec 27 18:02:14 2021
    On Monday, December 27, 2021 at 4:13:05 PM UTC-8, Bill Honaker wrote:
    On Mon, 27 Dec 2021 13:54:11 -0800 (PST), SRSeedBurners <sterli...@gmail.com> wrote:

    I have a test tool originally written in COBOL that I use to send transactions to our servers which is done via IPC. I now need to simulate sending transactions to our systems the same way outside vendors via a socket connection. I am not finding that
    COBOL supports tcpip socket io. If that is true, I was considering writing a C module to handle the tcpip and CALL'ing it from the COBOL test tool. However, I'm also finding Guardian COBOL does not support mixed language support as it does in OSS. So my
    only other option, re-write my test tool in C so I can use the Guardian socket library or move it to OSS and write an OSS C module and call it. Being a non-COBOL'er am I missing something?
    Not sure what led you to believe that mixed-language is not supported in Guardian Native compilers.

    Both the 'NonStop COBOL Manual for TNS/E and TNS/X Programs' and the 'C/C++ Programmer's Guide for NonStop Systems' say that both can be mixed.

    You can't use COBOL85, you have to use Native COBOL (ECOBOL or XCOBOL, depending on your system).
    You also have to use Native C (NMC or CCOMP, depending on your system). You will needt to use eld or xld to link them together.

    You could also do all builds in OSS, or on Windows using the cross compilers. All are documented in the manuals.

    Best of luck,
    Bill

    In addition to all that Bill said:

    If you want to build a Guardian program in OSS, you can do so by including the -Wsystype=guardian directive for the compiler to get it to create object files for running as Guardian processes. Make sure any libraries you reference explicitly are for
    Guardian when doing such a build from OSS.

    I'm not sure why Bill said you couldn't use COBOL85. If the Guardian sockets library is not available as a TNS (code 100) file, then that would prevent using it from a COBOL85 program, but I think the Guardian sockets library is old enough that it
    originally was a TNS file. Perhaps they don't distribute the TNS version any more?

    Anyway, you should be able to do what you want as a mixed COBOL and C program. If you still see some barrier, post again with more specifics about what seems to be a problem, and I am sure we will be able to help.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From SRSeedBurners@21:1/5 to Bill Honaker on Tue Dec 28 02:53:08 2021
    On Monday, December 27, 2021 at 6:13:05 PM UTC-6, Bill Honaker wrote:
    On Mon, 27 Dec 2021 13:54:11 -0800 (PST), SRSeedBurners <sterli...@gmail.com> wrote:

    Not sure what led you to believe that mixed-language is not supported in Guardian Native compilers.


    Thanks Bill. It was the section 'Mixed-Language Programs'. It specifically starts off by stating "In the OSS environment, you can write mixed-language programs." which made me assume you cannot do this on Guardian. I never made it to the Calling
    other Programs and Routines where it's specifically referring to Guardian side only.

    Speaking of cross-compilers, I have a real good question for that too but will save for a top post.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bill Honaker@21:1/5 to Keith Dick on Tue Dec 28 17:18:15 2021
    On Mon, 27 Dec 2021 18:02:14 -0800 (PST), Keith Dick <rkdick@gmail.com> wrote:

    On Monday, December 27, 2021 at 4:13:05 PM UTC-8, Bill Honaker wrote:
    On Mon, 27 Dec 2021 13:54:11 -0800 (PST), SRSeedBurners <sterli...@gmail.com> wrote:

    I have a test tool originally written in COBOL that I use to send transactions to our servers which is done via IPC. I now need to simulate sending transactions to our systems the same way outside vendors via a socket connection. I am not finding
    that COBOL supports tcpip socket io. If that is true, I was considering writing a C module to handle the tcpip and CALL'ing it from the COBOL test tool. However, I'm also finding Guardian COBOL does not support mixed language support as it does in OSS.
    So my only other option, re-write my test tool in C so I can use the Guardian socket library or move it to OSS and write an OSS C module and call it. Being a non-COBOL'er am I missing something?
    Not sure what led you to believe that mixed-language is not supported in Guardian Native compilers.

    Both the 'NonStop COBOL Manual for TNS/E and TNS/X Programs' and the 'C/C++ Programmer's Guide for NonStop Systems' say that both can be mixed.

    You can't use COBOL85, you have to use Native COBOL (ECOBOL or XCOBOL, depending on your system).
    You also have to use Native C (NMC or CCOMP, depending on your system). You will needt to use eld or xld to link them together.

    You could also do all builds in OSS, or on Windows using the cross compilers. All are documented in the manuals.

    Best of luck,
    Bill

    In addition to all that Bill said:

    If you want to build a Guardian program in OSS, you can do so by including the -Wsystype=guardian directive for the compiler to get it to create object files for running as Guardian processes. Make sure any libraries you reference explicitly are for
    Guardian when doing such a build from OSS.

    I'm not sure why Bill said you couldn't use COBOL85. If the Guardian sockets library is not available as a TNS (code 100) file, then that would prevent using it from a COBOL85 program, but I think the Guardian sockets library is old enough that it
    originally was a TNS file. Perhaps they don't distribute the TNS version any more?

    Anyway, you should be able to do what you want as a mixed COBOL and C program. If you still see some barrier, post again with more specifics about what seems to be a problem, and I am sure we will be able to help.

    Keith, I think I meant you couldn't use it with Native C... and also my thoughts included OSS which doesn't support TNS.
    But of course one can easily use C, COBOL85 and BIND, if that lowers the learning curve.

    For a program to run in OSS, another thing to consider is 'native' POSIX TCP/IP calls rather than the Guardian sockets.

    There are many, many ways to solve the OP's (SRSeedBurners) dilemma.
    Bill

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Randall@21:1/5 to Bill Honaker on Wed Dec 29 11:56:50 2021
    On Tuesday, December 28, 2021 at 6:18:17 p.m. UTC-5, Bill Honaker wrote:
    On Mon, 27 Dec 2021 18:02:14 -0800 (PST), Keith Dick <rkd...@gmail.com> wrote:

    On Monday, December 27, 2021 at 4:13:05 PM UTC-8, Bill Honaker wrote:
    On Mon, 27 Dec 2021 13:54:11 -0800 (PST), SRSeedBurners <sterli...@gmail.com> wrote:

    I have a test tool originally written in COBOL that I use to send transactions to our servers which is done via IPC. I now need to simulate sending transactions to our systems the same way outside vendors via a socket connection. I am not finding
    that COBOL supports tcpip socket io. If that is true, I was considering writing a C module to handle the tcpip and CALL'ing it from the COBOL test tool. However, I'm also finding Guardian COBOL does not support mixed language support as it does in OSS.
    So my only other option, re-write my test tool in C so I can use the Guardian socket library or move it to OSS and write an OSS C module and call it. Being a non-COBOL'er am I missing something?
    Not sure what led you to believe that mixed-language is not supported in Guardian Native compilers.

    Both the 'NonStop COBOL Manual for TNS/E and TNS/X Programs' and the 'C/C++ Programmer's Guide for NonStop Systems' say that both can be mixed.

    You can't use COBOL85, you have to use Native COBOL (ECOBOL or XCOBOL, depending on your system).
    You also have to use Native C (NMC or CCOMP, depending on your system). You will needt to use eld or xld to link them together.

    You could also do all builds in OSS, or on Windows using the cross compilers. All are documented in the manuals.

    Best of luck,
    Bill

    In addition to all that Bill said:

    If you want to build a Guardian program in OSS, you can do so by including the -Wsystype=guardian directive for the compiler to get it to create object files for running as Guardian processes. Make sure any libraries you reference explicitly are for
    Guardian when doing such a build from OSS.

    I'm not sure why Bill said you couldn't use COBOL85. If the Guardian sockets library is not available as a TNS (code 100) file, then that would prevent using it from a COBOL85 program, but I think the Guardian sockets library is old enough that it
    originally was a TNS file. Perhaps they don't distribute the TNS version any more?

    Anyway, you should be able to do what you want as a mixed COBOL and C program. If you still see some barrier, post again with more specifics about what seems to be a problem, and I am sure we will be able to help.
    Keith, I think I meant you couldn't use it with Native C... and also my thoughts included OSS which doesn't support TNS.
    But of course one can easily use C, COBOL85 and BIND, if that lowers the learning curve.

    For a program to run in OSS, another thing to consider is 'native' POSIX TCP/IP calls rather than the Guardian sockets.

    There are many, many ways to solve the OP's (SRSeedBurners) dilemma.
    Bill

    The last time I tested, the GUARDIAN socket calls, like accept_nw, could not be used from OSS. The same applies for threaded socket calls not being available to GUARDIAN. There was one RVU where the threaded calls worked by accident but no longer. Socket
    calls are personality-specific.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)