• PATHSEND/SERVERCLASS SEND procedure from C

    From uros kusar@21:1/5 to All on Fri May 28 00:06:17 2021
    Hi,
    I'm writing C program that would get the status of the xpnet objects (stations,processes,node...). I'm using procedures described in the HP manuals(Pathsend and Server programming Manual, C/C++ programmer's Guide...) but I can't get anyting from Pathway
    except errors. Can you tell me what am I doing wrong?

    This is the code that I'm working on: ----------------------------------------------------------------------------------------------------------------
    include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> nolist
    #include <tal.h>

    main()
    {
    short error, error2,pserror, fserror,countread;
    char *pmon;
    char *buffer;
    char *sname;

    pmon ="$D1MN";
    sname = "SERVER-NCPI-1A";
    buffer ="STATUS PROCESS P1A^BICUNI1";

    error = SERVERCLASS_SEND_ (pmon,
    (short) strlen(pmon), /* pathmon */
    sname,
    (short) strlen(sname), /* server class */
    buffer,
    (short) strlen(buffer),
    200,
    &countread,
    -1); /* timeout = forever */

    if (error != 0)
    {
    error2 = SERVERCLASS_SEND_INFO_ (&pserror, &fserror);
    printf ("\nSERVERCLASS_SEND_ error = %d, pathsend error = %d, fs error = %d\n", error, pserror, fserror);
    exit (1);
    }
    else
    {
    buffer [countread] = 0;
    printf ("\nReply = %s\n", buffer);
    }
    } ----------------------------------------------------------------------------------------------------------------
    Response:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 12

    Best Regards,
    Uros

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Keith Dick@21:1/5 to uros kusar on Fri May 28 10:08:20 2021
    On Friday, May 28, 2021 at 12:06:19 AM UTC-7, uros kusar wrote:
    Hi,
    I'm writing C program that would get the status of the xpnet objects (stations,processes,node...). I'm using procedures described in the HP manuals(Pathsend and Server programming Manual, C/C++ programmer's Guide...) but I can't get anyting from
    Pathway except errors. Can you tell me what am I doing wrong?

    This is the code that I'm working on: ----------------------------------------------------------------------------------------------------------------
    include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> nolist #include <tal.h>

    main()
    {
    short error, error2,pserror, fserror,countread;
    char *pmon;
    char *buffer;
    char *sname;

    pmon ="$D1MN";
    sname = "SERVER-NCPI-1A";
    buffer ="STATUS PROCESS P1A^BICUNI1";

    error = SERVERCLASS_SEND_ (pmon,
    (short) strlen(pmon), /* pathmon */
    sname,
    (short) strlen(sname), /* server class */
    buffer,
    (short) strlen(buffer),
    200,
    &countread,
    -1); /* timeout = forever */

    if (error != 0)
    {
    error2 = SERVERCLASS_SEND_INFO_ (&pserror, &fserror);
    printf ("\nSERVERCLASS_SEND_ error = %d, pathsend error = %d, fs error = %d\n", error, pserror, fserror);
    exit (1);
    }
    else
    {
    buffer [countread] = 0;
    printf ("\nReply = %s\n", buffer);
    }
    } ----------------------------------------------------------------------------------------------------------------
    Response:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 12

    Best Regards,
    Uros

    I see two coding errors in the program you included, but I cannot say whether either of them explains why the program is not working.

    One coding error is that you do not check the error return from SERVERCLASS_SEND_INFO_. If something was wrong with that call to SERVERCLASS_SEND_INFO_, the values you are displaying for pathsend error and fs error might not be true, thereby misleading
    you about what went wrong with the SERVERCLASS_SEND_ call.

    Assuming that nothing went wrong in the SERVERCLASS_SEND_INFO_ call, the errors were 904 and 12. The 904 says that there was an error when making the link to the server. Filesystem error 12 is the generic 'file in use' error when returned from an open
    of a disk file, but I'm not sure how to interpret it for a failure of a link request. If we dug into the description of link management, maybe there would be a description of what error 12 means in that context, but I did not take the time to do that
    right now.

    The other coding error is in the SERVERCLASS_SEND_ call. I am not sure it is the cause of the SERVERCLASS_SEND_ failure, but the first thing I would do is fix it and see whether that changes how the program works.

    The problem is that the SERVERCLASS_SEND_ call says that the buffer argument can accept a reply of 200 characters, but that is not how you declared buffer. You declared buffer to be a char*, then initialized it to point to the string constant

    "STATUS PROCESS P1A^BICUNI1"

    SERVERCLASS_SEND_ puts the reply into the same buffer from which it took the outgoing message. So in your program, if it actually got a reply, it would try to store it into the memory where "STATUS PROCESS P1A^BICUNI1" is. At the very least, that will
    destroy the supposedly constant value of that string. It might not be able to write into that storage if the compiler sets up string constants in a read-only memory segment. If the compiler sets up the string constant in a writable memory segment,
    storing the reply there could overwrite whatever data is stored following that string constant, since it is nowhere near 200 bytes long.

    So change your program to declare buffer to be a 200-byte array, and put the string constant into it using strcpy(). Then see whether you get a more sensible result. If you still get an error, post again and we can dig into how filesystem error 12 on a
    link request is supposed to be interpreted.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Randall@21:1/5 to rkd...@gmail.com on Fri May 28 11:51:20 2021
    On Friday, May 28, 2021 at 1:08:21 p.m. UTC-4, rkd...@gmail.com wrote:
    On Friday, May 28, 2021 at 12:06:19 AM UTC-7, uros kusar wrote:
    Hi,
    I'm writing C program that would get the status of the xpnet objects (stations,processes,node...). I'm using procedures described in the HP manuals(Pathsend and Server programming Manual, C/C++ programmer's Guide...) but I can't get anyting from
    Pathway except errors. Can you tell me what am I doing wrong?

    This is the code that I'm working on: ----------------------------------------------------------------------------------------------------------------
    include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> nolist #include <tal.h>

    main()
    {
    short error, error2,pserror, fserror,countread;
    char *pmon;
    char *buffer;
    char *sname;

    pmon ="$D1MN";
    sname = "SERVER-NCPI-1A";
    buffer ="STATUS PROCESS P1A^BICUNI1";

    error = SERVERCLASS_SEND_ (pmon,
    (short) strlen(pmon), /* pathmon */
    sname,
    (short) strlen(sname), /* server class */
    buffer,
    (short) strlen(buffer),
    200,
    &countread,
    -1); /* timeout = forever */

    if (error != 0)
    {
    error2 = SERVERCLASS_SEND_INFO_ (&pserror, &fserror);
    printf ("\nSERVERCLASS_SEND_ error = %d, pathsend error = %d, fs error = %d\n", error, pserror, fserror);
    exit (1);
    }
    else
    {
    buffer [countread] = 0;
    printf ("\nReply = %s\n", buffer);
    }
    } ----------------------------------------------------------------------------------------------------------------
    Response:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 12

    Best Regards,
    Uros
    I see two coding errors in the program you included, but I cannot say whether either of them explains why the program is not working.

    One coding error is that you do not check the error return from SERVERCLASS_SEND_INFO_. If something was wrong with that call to SERVERCLASS_SEND_INFO_, the values you are displaying for pathsend error and fs error might not be true, thereby misleading
    you about what went wrong with the SERVERCLASS_SEND_ call.

    Assuming that nothing went wrong in the SERVERCLASS_SEND_INFO_ call, the errors were 904 and 12. The 904 says that there was an error when making the link to the server. Filesystem error 12 is the generic 'file in use' error when returned from an open
    of a disk file, but I'm not sure how to interpret it for a failure of a link request. If we dug into the description of link management, maybe there would be a description of what error 12 means in that context, but I did not take the time to do that
    right now.

    The other coding error is in the SERVERCLASS_SEND_ call. I am not sure it is the cause of the SERVERCLASS_SEND_ failure, but the first thing I would do is fix it and see whether that changes how the program works.

    The problem is that the SERVERCLASS_SEND_ call says that the buffer argument can accept a reply of 200 characters, but that is not how you declared buffer. You declared buffer to be a char*, then initialized it to point to the string constant

    "STATUS PROCESS P1A^BICUNI1"

    SERVERCLASS_SEND_ puts the reply into the same buffer from which it took the outgoing message. So in your program, if it actually got a reply, it would try to store it into the memory where "STATUS PROCESS P1A^BICUNI1" is. At the very least, that will
    destroy the supposedly constant value of that string. It might not be able to write into that storage if the compiler sets up string constants in a read-only memory segment. If the compiler sets up the string constant in a writable memory segment,
    storing the reply there could overwrite whatever data is stored following that string constant, since it is nowhere near 200 bytes long.

    So change your program to declare buffer to be a 200-byte array, and put the string constant into it using strcpy(). Then see whether you get a more sensible result. If you still get an error, post again and we can dig into how filesystem error 12 on a
    link request is supposed to be interpreted.

    That's a really good catch. This is a very common coding error. The buffer used for SERVERCLASS_SEND_ also cannot be used for any other purpose while the message is being processed (same applies to WRITEREAD[XL]. It is, essentially locked, although that
    is not enforced by the CRE. There was a SETMODE for IPC communication but that significantly slows down your application and can eat up PFS space. Protecting buffer space during IPC operations is really important as a design consideration, particularly
    with IPC being implemented using DMA. A little known thing is that this can also apply to some esoteric threaded PUT socket operations. Buffer protection is critical for very high performance applications (as people who have seen the jelly bean challenge
    will remember - can't give more details).

    An error 12 is usually returned by the server based on the number of opens/LINKDEPTH. If your server is coded to accept only one open, then you can encounter this. Check your XPNet configuration - it may be limiting opens in this situation.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bill Honaker@21:1/5 to uros kusar on Fri May 28 14:48:59 2021
    On Fri, 28 May 2021 00:06:17 -0700 (PDT), uros kusar <uros.kusar@gmail.com> wrote:

    Hi,
    I'm writing C program that would get the status of the xpnet objects (stations,processes,node...). I'm using procedures described in the HP manuals(Pathsend and Server programming Manual, C/C++ programmer's Guide...) but I can't get anyting from Pathway
    except errors. Can you tell me what am I doing wrong?

    This is the code that I'm working on: >----------------------------------------------------------------------------------------------------------------
    include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> nolist >#include <tal.h>

    main()
    {
    short error, error2,pserror, fserror,countread;
    char *pmon;
    char *buffer;
    char *sname;

    pmon ="$D1MN";
    sname = "SERVER-NCPI-1A";
    buffer ="STATUS PROCESS P1A^BICUNI1";

    error = SERVERCLASS_SEND_ (pmon,
    (short) strlen(pmon), /* pathmon */
    sname,
    (short) strlen(sname), /* server class */
    buffer,
    (short) strlen(buffer),
    200,
    &countread,
    -1); /* timeout = forever */

    if (error != 0)
    {
    error2 = SERVERCLASS_SEND_INFO_ (&pserror, &fserror);
    printf ("\nSERVERCLASS_SEND_ error = %d, pathsend error = %d, fs error = %d\n", error, pserror, fserror);
    exit (1);
    }
    else
    {
    buffer [countread] = 0;
    printf ("\nReply = %s\n", buffer);
    }
    } >----------------------------------------------------------------------------------------------------------------
    Response:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 12

    Best Regards,
    Uros

    Uros,

    Keith and Randall gave very valuable responses.

    Also one other possibility is that, in creating the link, the PATHMON tried to start a server process.
    If that server process has a fixed PROCESS NAME for each isntance, and if there is already a running process with that name,
    the attempt to start the process would get an error 12. Look at the info ("PATHCOM $D1MN;INFO SERVER-NCPI-1A") and
    check what is in the "PROCESS". If it's present, there will either be one process name, or a list in paraentheses.
    From a TACL prompt, issue a status command for each process in the list.

    Bill

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Keith Dick@21:1/5 to Bill Honaker on Fri May 28 13:22:58 2021
    On Friday, May 28, 2021 at 12:49:03 PM UTC-7, Bill Honaker wrote:
    On Fri, 28 May 2021 00:06:17 -0700 (PDT), uros kusar <uros....@gmail.com> wrote:

    Hi,
    I'm writing C program that would get the status of the xpnet objects (stations,processes,node...). I'm using procedures described in the HP manuals(Pathsend and Server programming Manual, C/C++ programmer's Guide...) but I can't get anyting from
    Pathway except errors. Can you tell me what am I doing wrong?

    This is the code that I'm working on: >----------------------------------------------------------------------------------------------------------------
    include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> nolist >#include <tal.h>

    main()
    {
    short error, error2,pserror, fserror,countread;
    char *pmon;
    char *buffer;
    char *sname;

    pmon ="$D1MN";
    sname = "SERVER-NCPI-1A";
    buffer ="STATUS PROCESS P1A^BICUNI1";

    error = SERVERCLASS_SEND_ (pmon,
    (short) strlen(pmon), /* pathmon */
    sname,
    (short) strlen(sname), /* server class */
    buffer,
    (short) strlen(buffer),
    200,
    &countread,
    -1); /* timeout = forever */

    if (error != 0)
    {
    error2 = SERVERCLASS_SEND_INFO_ (&pserror, &fserror);
    printf ("\nSERVERCLASS_SEND_ error = %d, pathsend error = %d, fs error = %d\n", error, pserror, fserror);
    exit (1);
    }
    else
    {
    buffer [countread] = 0;
    printf ("\nReply = %s\n", buffer);
    }
    } >----------------------------------------------------------------------------------------------------------------
    Response:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 12

    Best Regards,
    Uros
    Uros,

    Keith and Randall gave very valuable responses.

    Also one other possibility is that, in creating the link, the PATHMON tried to start a server process.
    If that server process has a fixed PROCESS NAME for each isntance, and if there is already a running process with that name,
    the attempt to start the process would get an error 12. Look at the info ("PATHCOM $D1MN;INFO SERVER-NCPI-1A") and
    check what is in the "PROCESS". If it's present, there will either be one process name, or a list in paraentheses.
    From a TACL prompt, issue a status command for each process in the list.

    Bill

    Bill,

    Very good remembering that filesystem error 12 is used for attempting to start a process with a name that already exists. I should have remembered that myself. Unless Pathway's link management also uses filesystem error 12 for other problems, I'd say a
    duplicate process name is likely to be the explanation for this problem. Perhaps Uros has set up a test environment by duplicating the configuration of an existing environment and did not know to change the configured fixed server process names.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From uros kusar@21:1/5 to All on Mon May 31 04:07:05 2021
    petek, 28. maj 2021 ob 22:22:59 UTC+2 je oseba rkd...@gmail.com napisala:
    On Friday, May 28, 2021 at 12:49:03 PM UTC-7, Bill Honaker wrote:
    On Fri, 28 May 2021 00:06:17 -0700 (PDT), uros kusar <uros....@gmail.com> wrote:

    Hi,
    I'm writing C program that would get the status of the xpnet objects (stations,processes,node...). I'm using procedures described in the HP manuals(Pathsend and Server programming Manual, C/C++ programmer's Guide...) but I can't get anyting from
    Pathway except errors. Can you tell me what am I doing wrong?

    This is the code that I'm working on: >----------------------------------------------------------------------------------------------------------------
    include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> nolist >#include <tal.h>

    main()
    {
    short error, error2,pserror, fserror,countread;
    char *pmon;
    char *buffer;
    char *sname;

    pmon ="$D1MN";
    sname = "SERVER-NCPI-1A";
    buffer ="STATUS PROCESS P1A^BICUNI1";

    error = SERVERCLASS_SEND_ (pmon,
    (short) strlen(pmon), /* pathmon */
    sname,
    (short) strlen(sname), /* server class */
    buffer,
    (short) strlen(buffer),
    200,
    &countread,
    -1); /* timeout = forever */

    if (error != 0)
    {
    error2 = SERVERCLASS_SEND_INFO_ (&pserror, &fserror);
    printf ("\nSERVERCLASS_SEND_ error = %d, pathsend error = %d, fs error = %d\n", error, pserror, fserror);
    exit (1);
    }
    else
    {
    buffer [countread] = 0;
    printf ("\nReply = %s\n", buffer);
    }
    } >----------------------------------------------------------------------------------------------------------------
    Response:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 12

    Best Regards,
    Uros
    Uros,

    Keith and Randall gave very valuable responses.

    Also one other possibility is that, in creating the link, the PATHMON tried to start a server process.
    If that server process has a fixed PROCESS NAME for each isntance, and if there is already a running process with that name,
    the attempt to start the process would get an error 12. Look at the info ("PATHCOM $D1MN;INFO SERVER-NCPI-1A") and
    check what is in the "PROCESS". If it's present, there will either be one process name, or a list in paraentheses.
    From a TACL prompt, issue a status command for each process in the list.

    Bill
    Bill,

    Very good remembering that filesystem error 12 is used for attempting to start a process with a name that already exists. I should have remembered that myself. Unless Pathway's link management also uses filesystem error 12 for other problems, I'd say a
    duplicate process name is likely to be the explanation for this problem. Perhaps Uros has set up a test environment by duplicating the configuration of an existing environment and did not know to change the configured fixed server process names.
    Hi,

    Thank you all for your help.

    I changed the code:
    1) I added SERVERCLASS_SEND_INFO output error number to see if command was succsesfully processed.
    2) I changed the buffer to a 200-byte array.
    3) I find some tal example of a similar program and I noticed that this tal program, sends the command to a different pathway server. I send it to the SERVER-NCPI-1A server, which is a server for P1A^NODE. But the tal program sends the command to the
    server SERVER-NCP, which sees all "node" servers.

    It is interesting because if I send a command to SERVER-NCP I get a different error code.
    SERVER-NCP:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 21

    SERVER-NCP-1A:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 12

    I think that the correct server is a SERVER-NCP.

    ---------------------------------------------------------------------------------------------------------------------------------------------
    Pahway server configuration:
    MAXLINKMONS 20 [CURRENTLY 2]

    SERVER SERVER-NCPI-1A
    LINKDEPTH 1
    MAXLINKS 32
    MAXSERVERS 3
    PROCESS $D1AU (ASSOCIATIVE ON)

    SERVER SERVER-NCP
    LINKDEPTH 32
    MAXLINKS 32
    MAXSERVERS 3
    PROCESS $D1C1
    PROCESS $D1C2
    PROCESS $D1C3 ---------------------------------------------------------------------------------------------------------------------------------------------
    code:
    #include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <tal.h>
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> nolist
    main()
    {
    short error, error2, pserror, fserror,countread;
    char *pmon;
    char buffer [200]={0};
    char *sname;

    pmon ="$D1MN";
    sname = "SERVER-NCP";
    strcpy(buffer,"STATUS PROCESS P1A^BICUNI1");

    error = SERVERCLASS_SEND_ (pmon,
    (short)strlen(pmon), /* pathmon */
    sname,
    (short)strlen(sname), /* server class */
    buffer,
    (short)strlen(buffer),
    200,
    &countread,
    -1); /* timeout = forever */
    if (error != 0)
    {
    error2 = SERVERCLASS_SEND_INFO_ (&pserror, &fserror);
    printf("\nSERVERCLASS_SEND_INFO error = %d \nSERVERCLASS_SEND_ error = %d, pathsend error = %d, fs error = %d\n",error2, error, pserror, fserror);
    printf("\nBuffer size = %d\n", strlen(buffer));

    int i;
    for(i=0; i<strlen(buffer); i++)
    {
    printf("%c",buffer[i]);
    }
    printf("\n\n\n");
    exit (1);
    }
    else
    {
    buffer [countread] = 0;
    printf ("\nReply = %s\n", buffer);
    }
    }

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Keith Dick@21:1/5 to uros kusar on Mon May 31 06:57:14 2021
    On Monday, May 31, 2021 at 4:07:06 AM UTC-7, uros kusar wrote:
    petek, 28. maj 2021 ob 22:22:59 UTC+2 je oseba rkd...@gmail.com napisala:
    On Friday, May 28, 2021 at 12:49:03 PM UTC-7, Bill Honaker wrote:
    On Fri, 28 May 2021 00:06:17 -0700 (PDT), uros kusar <uros....@gmail.com> wrote:

    Hi,
    I'm writing C program that would get the status of the xpnet objects (stations,processes,node...). I'm using procedures described in the HP manuals(Pathsend and Server programming Manual, C/C++ programmer's Guide...) but I can't get anyting from
    Pathway except errors. Can you tell me what am I doing wrong?

    This is the code that I'm working on: >----------------------------------------------------------------------------------------------------------------
    include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> nolist >#include <tal.h>

    main()
    {
    short error, error2,pserror, fserror,countread;
    char *pmon;
    char *buffer;
    char *sname;

    pmon ="$D1MN";
    sname = "SERVER-NCPI-1A";
    buffer ="STATUS PROCESS P1A^BICUNI1";

    error = SERVERCLASS_SEND_ (pmon,
    (short) strlen(pmon), /* pathmon */
    sname,
    (short) strlen(sname), /* server class */
    buffer,
    (short) strlen(buffer),
    200,
    &countread,
    -1); /* timeout = forever */

    if (error != 0)
    {
    error2 = SERVERCLASS_SEND_INFO_ (&pserror, &fserror);
    printf ("\nSERVERCLASS_SEND_ error = %d, pathsend error = %d, fs error = %d\n", error, pserror, fserror);
    exit (1);
    }
    else
    {
    buffer [countread] = 0;
    printf ("\nReply = %s\n", buffer);
    }
    } >----------------------------------------------------------------------------------------------------------------
    Response:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 12

    Best Regards,
    Uros
    Uros,

    Keith and Randall gave very valuable responses.

    Also one other possibility is that, in creating the link, the PATHMON tried to start a server process.
    If that server process has a fixed PROCESS NAME for each isntance, and if there is already a running process with that name,
    the attempt to start the process would get an error 12. Look at the info ("PATHCOM $D1MN;INFO SERVER-NCPI-1A") and
    check what is in the "PROCESS". If it's present, there will either be one process name, or a list in paraentheses.
    From a TACL prompt, issue a status command for each process in the list.

    Bill
    Bill,

    Very good remembering that filesystem error 12 is used for attempting to start a process with a name that already exists. I should have remembered that myself. Unless Pathway's link management also uses filesystem error 12 for other problems, I'd say
    a duplicate process name is likely to be the explanation for this problem. Perhaps Uros has set up a test environment by duplicating the configuration of an existing environment and did not know to change the configured fixed server process names.
    Hi,

    Thank you all for your help.

    I changed the code:
    1) I added SERVERCLASS_SEND_INFO output error number to see if command was succsesfully processed.
    2) I changed the buffer to a 200-byte array.
    3) I find some tal example of a similar program and I noticed that this tal program, sends the command to a different pathway server. I send it to the SERVER-NCPI-1A server, which is a server for P1A^NODE. But the tal program sends the command to the
    server SERVER-NCP, which sees all "node" servers.

    It is interesting because if I send a command to SERVER-NCP I get a different error code.
    SERVER-NCP:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 21

    SERVER-NCP-1A:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 12
    I think that the correct server is a SERVER-NCP.

    ---------------------------------------------------------------------------------------------------------------------------------------------
    Pahway server configuration:
    MAXLINKMONS 20 [CURRENTLY 2]

    SERVER SERVER-NCPI-1A
    LINKDEPTH 1
    MAXLINKS 32
    MAXSERVERS 3
    PROCESS $D1AU (ASSOCIATIVE ON)

    SERVER SERVER-NCP
    LINKDEPTH 32
    MAXLINKS 32
    MAXSERVERS 3
    PROCESS $D1C1
    PROCESS $D1C2
    PROCESS $D1C3 ---------------------------------------------------------------------------------------------------------------------------------------------
    code:
    #include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <tal.h>
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> nolist
    main()
    {
    short error, error2, pserror, fserror,countread;
    char *pmon;
    char buffer [200]={0};
    char *sname;

    pmon ="$D1MN";
    sname = "SERVER-NCP";
    strcpy(buffer,"STATUS PROCESS P1A^BICUNI1");

    error = SERVERCLASS_SEND_ (pmon,
    (short)strlen(pmon), /* pathmon */
    sname,
    (short)strlen(sname), /* server class */
    buffer,
    (short)strlen(buffer),
    200,
    &countread,
    -1); /* timeout = forever */
    if (error != 0)
    {
    error2 = SERVERCLASS_SEND_INFO_ (&pserror, &fserror); printf("\nSERVERCLASS_SEND_INFO error = %d \nSERVERCLASS_SEND_ error = %d, pathsend error = %d, fs error = %d\n",error2, error, pserror, fserror);
    printf("\nBuffer size = %d\n", strlen(buffer));

    int i;
    for(i=0; i<strlen(buffer); i++)
    {
    printf("%c",buffer[i]);
    }
    printf("\n\n\n");
    exit (1);
    }
    else
    {
    buffer [countread] = 0;
    printf ("\nReply = %s\n", buffer);
    }
    }

    Filesystem error 21 usually means an illegal count was specified. That might mean that either the length of the buffer you are sending is wrong or the maximum reply size (200 in this case) is wrong. It might mean something else, since I don't know
    anything about XPNET.

    Pathway servers usually take input as data structures with fixed-length fields, not a text string like you would type to a command interpreter. Are you sure that the server you are sending to is expected a text string as its input? Do you have any
    documentation of what this server's interface is?

    I notice that, although you show a new program that displays the value of error2, the output that you show does not include the line that would show the value of error2. Did you omit showing it because its value was 0, or are you showing output from a
    different version of your program?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Randall@21:1/5 to rkd...@gmail.com on Mon May 31 10:37:21 2021
    On Monday, May 31, 2021 at 9:57:15 a.m. UTC-4, rkd...@gmail.com wrote:
    On Monday, May 31, 2021 at 4:07:06 AM UTC-7, uros kusar wrote:
    petek, 28. maj 2021 ob 22:22:59 UTC+2 je oseba rkd...@gmail.com napisala:
    On Friday, May 28, 2021 at 12:49:03 PM UTC-7, Bill Honaker wrote:
    On Fri, 28 May 2021 00:06:17 -0700 (PDT), uros kusar <uros....@gmail.com> wrote:

    Hi,
    I'm writing C program that would get the status of the xpnet objects (stations,processes,node...). I'm using procedures described in the HP manuals(Pathsend and Server programming Manual, C/C++ programmer's Guide...) but I can't get anyting from
    Pathway except errors. Can you tell me what am I doing wrong?

    This is the code that I'm working on: >----------------------------------------------------------------------------------------------------------------
    include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> nolist
    #include <tal.h>

    main()
    {
    short error, error2,pserror, fserror,countread;
    char *pmon;
    char *buffer;
    char *sname;

    pmon ="$D1MN";
    sname = "SERVER-NCPI-1A";
    buffer ="STATUS PROCESS P1A^BICUNI1";

    error = SERVERCLASS_SEND_ (pmon,
    (short) strlen(pmon), /* pathmon */
    sname,
    (short) strlen(sname), /* server class */
    buffer,
    (short) strlen(buffer),
    200,
    &countread,
    -1); /* timeout = forever */

    if (error != 0)
    {
    error2 = SERVERCLASS_SEND_INFO_ (&pserror, &fserror);
    printf ("\nSERVERCLASS_SEND_ error = %d, pathsend error = %d, fs error = %d\n", error, pserror, fserror);
    exit (1);
    }
    else
    {
    buffer [countread] = 0;
    printf ("\nReply = %s\n", buffer);
    }
    } >----------------------------------------------------------------------------------------------------------------
    Response:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 12

    Best Regards,
    Uros
    Uros,

    Keith and Randall gave very valuable responses.

    Also one other possibility is that, in creating the link, the PATHMON tried to start a server process.
    If that server process has a fixed PROCESS NAME for each isntance, and if there is already a running process with that name,
    the attempt to start the process would get an error 12. Look at the info ("PATHCOM $D1MN;INFO SERVER-NCPI-1A") and
    check what is in the "PROCESS". If it's present, there will either be one process name, or a list in paraentheses.
    From a TACL prompt, issue a status command for each process in the list.

    Bill
    Bill,

    Very good remembering that filesystem error 12 is used for attempting to start a process with a name that already exists. I should have remembered that myself. Unless Pathway's link management also uses filesystem error 12 for other problems, I'd
    say a duplicate process name is likely to be the explanation for this problem. Perhaps Uros has set up a test environment by duplicating the configuration of an existing environment and did not know to change the configured fixed server process names.
    Hi,

    Thank you all for your help.

    I changed the code:
    1) I added SERVERCLASS_SEND_INFO output error number to see if command was succsesfully processed.
    2) I changed the buffer to a 200-byte array.
    3) I find some tal example of a similar program and I noticed that this tal program, sends the command to a different pathway server. I send it to the SERVER-NCPI-1A server, which is a server for P1A^NODE. But the tal program sends the command to the
    server SERVER-NCP, which sees all "node" servers.

    It is interesting because if I send a command to SERVER-NCP I get a different error code.
    SERVER-NCP:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 21

    SERVER-NCP-1A:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 12
    I think that the correct server is a SERVER-NCP.

    ---------------------------------------------------------------------------------------------------------------------------------------------
    Pahway server configuration:
    MAXLINKMONS 20 [CURRENTLY 2]

    SERVER SERVER-NCPI-1A
    LINKDEPTH 1
    MAXLINKS 32
    MAXSERVERS 3
    PROCESS $D1AU (ASSOCIATIVE ON)

    SERVER SERVER-NCP
    LINKDEPTH 32
    MAXLINKS 32
    MAXSERVERS 3
    PROCESS $D1C1
    PROCESS $D1C2
    PROCESS $D1C3 ---------------------------------------------------------------------------------------------------------------------------------------------
    code:
    #include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <tal.h>
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> nolist main()
    {
    short error, error2, pserror, fserror,countread;
    char *pmon;
    char buffer [200]={0};
    char *sname;

    pmon ="$D1MN";
    sname = "SERVER-NCP";
    strcpy(buffer,"STATUS PROCESS P1A^BICUNI1");

    error = SERVERCLASS_SEND_ (pmon,
    (short)strlen(pmon), /* pathmon */
    sname,
    (short)strlen(sname), /* server class */
    buffer,
    (short)strlen(buffer),
    200,
    &countread,
    -1); /* timeout = forever */
    if (error != 0)
    {
    error2 = SERVERCLASS_SEND_INFO_ (&pserror, &fserror); printf("\nSERVERCLASS_SEND_INFO error = %d \nSERVERCLASS_SEND_ error = %d, pathsend error = %d, fs error = %d\n",error2, error, pserror, fserror);
    printf("\nBuffer size = %d\n", strlen(buffer));

    int i;
    for(i=0; i<strlen(buffer); i++)
    {
    printf("%c",buffer[i]);
    }
    printf("\n\n\n");
    exit (1);
    }
    else
    {
    buffer [countread] = 0;
    printf ("\nReply = %s\n", buffer);
    }
    }
    Filesystem error 21 usually means an illegal count was specified. That might mean that either the length of the buffer you are sending is wrong or the maximum reply size (200 in this case) is wrong. It might mean something else, since I don't know
    anything about XPNET.

    Pathway servers usually take input as data structures with fixed-length fields, not a text string like you would type to a command interpreter. Are you sure that the server you are sending to is expected a text string as its input? Do you have any
    documentation of what this server's interface is?

    I notice that, although you show a new program that displays the value of error2, the output that you show does not include the line that would show the value of error2. Did you omit showing it because its value was 0, or are you showing output from a
    different version of your program?

    I too do not remember much about XPNet, but I thought it was not SERVERCLASS_SEND_ compatible - in particular, does not require a qualified name on the Open, like $XPN.#XPNET?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Keith Dick@21:1/5 to Randall on Mon May 31 11:27:45 2021
    On Monday, May 31, 2021 at 10:37:22 AM UTC-7, Randall wrote:
    On Monday, May 31, 2021 at 9:57:15 a.m. UTC-4, rkd...@gmail.com wrote:
    On Monday, May 31, 2021 at 4:07:06 AM UTC-7, uros kusar wrote:
    petek, 28. maj 2021 ob 22:22:59 UTC+2 je oseba rkd...@gmail.com napisala:
    On Friday, May 28, 2021 at 12:49:03 PM UTC-7, Bill Honaker wrote:
    On Fri, 28 May 2021 00:06:17 -0700 (PDT), uros kusar <uros....@gmail.com> wrote:

    Hi,
    I'm writing C program that would get the status of the xpnet objects (stations,processes,node...). I'm using procedures described in the HP manuals(Pathsend and Server programming Manual, C/C++ programmer's Guide...) but I can't get anyting
    from Pathway except errors. Can you tell me what am I doing wrong?

    This is the code that I'm working on: >----------------------------------------------------------------------------------------------------------------
    include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> nolist
    #include <tal.h>

    main()
    {
    short error, error2,pserror, fserror,countread;
    char *pmon;
    char *buffer;
    char *sname;

    pmon ="$D1MN";
    sname = "SERVER-NCPI-1A";
    buffer ="STATUS PROCESS P1A^BICUNI1";

    error = SERVERCLASS_SEND_ (pmon,
    (short) strlen(pmon), /* pathmon */
    sname,
    (short) strlen(sname), /* server class */
    buffer,
    (short) strlen(buffer),
    200,
    &countread,
    -1); /* timeout = forever */

    if (error != 0)
    {
    error2 = SERVERCLASS_SEND_INFO_ (&pserror, &fserror);
    printf ("\nSERVERCLASS_SEND_ error = %d, pathsend error = %d, fs error = %d\n", error, pserror, fserror);
    exit (1);
    }
    else
    {
    buffer [countread] = 0;
    printf ("\nReply = %s\n", buffer);
    }
    } >----------------------------------------------------------------------------------------------------------------
    Response:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 12

    Best Regards,
    Uros
    Uros,

    Keith and Randall gave very valuable responses.

    Also one other possibility is that, in creating the link, the PATHMON tried to start a server process.
    If that server process has a fixed PROCESS NAME for each isntance, and if there is already a running process with that name,
    the attempt to start the process would get an error 12. Look at the info ("PATHCOM $D1MN;INFO SERVER-NCPI-1A") and
    check what is in the "PROCESS". If it's present, there will either be one process name, or a list in paraentheses.
    From a TACL prompt, issue a status command for each process in the list.

    Bill
    Bill,

    Very good remembering that filesystem error 12 is used for attempting to start a process with a name that already exists. I should have remembered that myself. Unless Pathway's link management also uses filesystem error 12 for other problems, I'd
    say a duplicate process name is likely to be the explanation for this problem. Perhaps Uros has set up a test environment by duplicating the configuration of an existing environment and did not know to change the configured fixed server process names.
    Hi,

    Thank you all for your help.

    I changed the code:
    1) I added SERVERCLASS_SEND_INFO output error number to see if command was succsesfully processed.
    2) I changed the buffer to a 200-byte array.
    3) I find some tal example of a similar program and I noticed that this tal program, sends the command to a different pathway server. I send it to the SERVER-NCPI-1A server, which is a server for P1A^NODE. But the tal program sends the command to
    the server SERVER-NCP, which sees all "node" servers.

    It is interesting because if I send a command to SERVER-NCP I get a different error code.
    SERVER-NCP:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 21

    SERVER-NCP-1A:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 12
    I think that the correct server is a SERVER-NCP.

    ---------------------------------------------------------------------------------------------------------------------------------------------
    Pahway server configuration:
    MAXLINKMONS 20 [CURRENTLY 2]

    SERVER SERVER-NCPI-1A
    LINKDEPTH 1
    MAXLINKS 32
    MAXSERVERS 3
    PROCESS $D1AU (ASSOCIATIVE ON)

    SERVER SERVER-NCP
    LINKDEPTH 32
    MAXLINKS 32
    MAXSERVERS 3
    PROCESS $D1C1
    PROCESS $D1C2
    PROCESS $D1C3 ---------------------------------------------------------------------------------------------------------------------------------------------
    code:
    #include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <tal.h>
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> nolist main()
    {
    short error, error2, pserror, fserror,countread;
    char *pmon;
    char buffer [200]={0};
    char *sname;

    pmon ="$D1MN";
    sname = "SERVER-NCP";
    strcpy(buffer,"STATUS PROCESS P1A^BICUNI1");

    error = SERVERCLASS_SEND_ (pmon,
    (short)strlen(pmon), /* pathmon */
    sname,
    (short)strlen(sname), /* server class */
    buffer,
    (short)strlen(buffer),
    200,
    &countread,
    -1); /* timeout = forever */
    if (error != 0)
    {
    error2 = SERVERCLASS_SEND_INFO_ (&pserror, &fserror); printf("\nSERVERCLASS_SEND_INFO error = %d \nSERVERCLASS_SEND_ error = %d, pathsend error = %d, fs error = %d\n",error2, error, pserror, fserror);
    printf("\nBuffer size = %d\n", strlen(buffer));

    int i;
    for(i=0; i<strlen(buffer); i++)
    {
    printf("%c",buffer[i]);
    }
    printf("\n\n\n");
    exit (1);
    }
    else
    {
    buffer [countread] = 0;
    printf ("\nReply = %s\n", buffer);
    }
    }
    Filesystem error 21 usually means an illegal count was specified. That might mean that either the length of the buffer you are sending is wrong or the maximum reply size (200 in this case) is wrong. It might mean something else, since I don't know
    anything about XPNET.

    Pathway servers usually take input as data structures with fixed-length fields, not a text string like you would type to a command interpreter. Are you sure that the server you are sending to is expected a text string as its input? Do you have any
    documentation of what this server's interface is?

    I notice that, although you show a new program that displays the value of error2, the output that you show does not include the line that would show the value of error2. Did you omit showing it because its value was 0, or are you showing output from
    a different version of your program?
    I too do not remember much about XPNet, but I thought it was not SERVERCLASS_SEND_ compatible - in particular, does not require a qualified name on the Open, like $XPN.#XPNET?

    Given that Uros' most recent post shows a Pathway configuration, whatever he is trying to communicate with appears to be a Pathway serverclass and so should be able to accept a request sent by SEVERCLASS_SEND_. Pathway servers usually don't accept free
    format text strings as request messages, but I don't immediately recall anything that would prevent one from being written to accept that. I believe the reply messages must have a 16-bit reply code as the first two bytes, at least if it is to be usable
    from Screen COBOL, but i don't believe there is any similar constraint on the request messages.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bill Honaker@21:1/5 to uros kusar on Mon May 31 14:59:27 2021
    On Mon, 31 May 2021 04:07:05 -0700 (PDT), uros kusar <uros.kusar@gmail.com> wrote:

    petek, 28. maj 2021 ob 22:22:59 UTC+2 je oseba rkd...@gmail.com napisala:
    On Friday, May 28, 2021 at 12:49:03 PM UTC-7, Bill Honaker wrote:
    On Fri, 28 May 2021 00:06:17 -0700 (PDT), uros kusar <uros....@gmail.com> wrote:

    Hi,
    I'm writing C program that would get the status of the xpnet objects (stations,processes,node...). I'm using procedures described in the HP manuals(Pathsend and Server programming Manual, C/C++ programmer's Guide...) but I can't get anyting from
    Pathway except errors. Can you tell me what am I doing wrong?

    This is the code that I'm working on:
    ----------------------------------------------------------------------------------------------------------------
    include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> nolist
    #include <tal.h>

    main()
    {
    short error, error2,pserror, fserror,countread;
    char *pmon;
    char *buffer;
    char *sname;

    pmon ="$D1MN";
    sname = "SERVER-NCPI-1A";
    buffer ="STATUS PROCESS P1A^BICUNI1";

    error = SERVERCLASS_SEND_ (pmon,
    (short) strlen(pmon), /* pathmon */
    sname,
    (short) strlen(sname), /* server class */
    buffer,
    (short) strlen(buffer),
    200,
    &countread,
    -1); /* timeout = forever */

    if (error != 0)
    {
    error2 = SERVERCLASS_SEND_INFO_ (&pserror, &fserror);
    printf ("\nSERVERCLASS_SEND_ error = %d, pathsend error = %d, fs error = %d\n", error, pserror, fserror);
    exit (1);
    }
    else
    {
    buffer [countread] = 0;
    printf ("\nReply = %s\n", buffer);
    }
    }
    ----------------------------------------------------------------------------------------------------------------
    Response:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 12

    Best Regards,
    Uros
    Uros,

    Keith and Randall gave very valuable responses.

    Also one other possibility is that, in creating the link, the PATHMON tried to start a server process.
    If that server process has a fixed PROCESS NAME for each isntance, and if there is already a running process with that name,
    the attempt to start the process would get an error 12. Look at the info ("PATHCOM $D1MN;INFO SERVER-NCPI-1A") and
    check what is in the "PROCESS". If it's present, there will either be one process name, or a list in paraentheses.
    From a TACL prompt, issue a status command for each process in the list. >> >
    Bill
    Bill,

    Very good remembering that filesystem error 12 is used for attempting to start a process with a name that already exists. I should have remembered that myself. Unless Pathway's link management also uses filesystem error 12 for other problems, I'd say
    a duplicate process name is likely to be the explanation for this problem. Perhaps Uros has set up a test environment by duplicating the configuration of an existing environment and did not know to change the configured fixed server process names.
    Hi,

    Thank you all for your help.

    I changed the code:
    1) I added SERVERCLASS_SEND_INFO output error number to see if command was succsesfully processed.
    2) I changed the buffer to a 200-byte array.
    3) I find some tal example of a similar program and I noticed that this tal program, sends the command to a different pathway server. I send it to the SERVER-NCPI-1A server, which is a server for P1A^NODE. But the tal program sends the command to the
    server SERVER-NCP, which sees all "node" servers.

    It is interesting because if I send a command to SERVER-NCP I get a different error code.
    SERVER-NCP:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 21

    SERVER-NCP-1A:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 12

    I think that the correct server is a SERVER-NCP.

    ---------------------------------------------------------------------------------------------------------------------------------------------
    Pahway server configuration:
    MAXLINKMONS 20 [CURRENTLY 2]

    SERVER SERVER-NCPI-1A
    LINKDEPTH 1
    MAXLINKS 32
    MAXSERVERS 3
    PROCESS $D1AU (ASSOCIATIVE ON)

    SERVER SERVER-NCP
    LINKDEPTH 32
    MAXLINKS 32
    MAXSERVERS 3
    PROCESS $D1C1
    PROCESS $D1C2
    PROCESS $D1C3
    ---------------------------------------------------------------------------------------------------------------------------------------------
    code:
    #include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <tal.h>
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> nolist
    main()
    {
    short error, error2, pserror, fserror,countread;
    char *pmon;
    char buffer [200]={0};
    char *sname;

    pmon ="$D1MN";
    sname = "SERVER-NCP";
    strcpy(buffer,"STATUS PROCESS P1A^BICUNI1");

    error = SERVERCLASS_SEND_ (pmon,
    (short)strlen(pmon), /* pathmon */
    sname,
    (short)strlen(sname), /* server class */
    buffer,
    (short)strlen(buffer),
    200,
    &countread,
    -1); /* timeout = forever */
    if (error != 0)
    {
    error2 = SERVERCLASS_SEND_INFO_ (&pserror, &fserror);
    printf("\nSERVERCLASS_SEND_INFO error = %d \nSERVERCLASS_SEND_ error = %d, pathsend error = %d, fs error = %d\n",error2, error, pserror, fserror);
    printf("\nBuffer size = %d\n", strlen(buffer));

    int i;
    for(i=0; i<strlen(buffer); i++)
    {
    printf("%c",buffer[i]);
    }
    printf("\n\n\n");
    exit (1);
    }
    else
    {
    buffer [countread] = 0;
    printf ("\nReply = %s\n", buffer);
    }
    }

    I see the original server was setup with 'Asoociative On' It's possible the open table in the server can't accept another open.

    Can't explain the error 21.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dave Bossi@21:1/5 to Bill Honaker on Tue Jun 1 05:09:59 2021
    On Monday, May 31, 2021 at 3:59:31 PM UTC-4, Bill Honaker wrote:
    On Mon, 31 May 2021 04:07:05 -0700 (PDT), uros kusar <uros....@gmail.com> wrote:

    petek, 28. maj 2021 ob 22:22:59 UTC+2 je oseba rkd...@gmail.com napisala: >> On Friday, May 28, 2021 at 12:49:03 PM UTC-7, Bill Honaker wrote:
    On Fri, 28 May 2021 00:06:17 -0700 (PDT), uros kusar <uros....@gmail.com> wrote:

    Hi,
    I'm writing C program that would get the status of the xpnet objects (stations,processes,node...). I'm using procedures described in the HP manuals(Pathsend and Server programming Manual, C/C++ programmer's Guide...) but I can't get anyting from
    Pathway except errors. Can you tell me what am I doing wrong?

    This is the code that I'm working on:
    ----------------------------------------------------------------------------------------------------------------
    include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> nolist >> > >#include <tal.h>

    main()
    {
    short error, error2,pserror, fserror,countread;
    char *pmon;
    char *buffer;
    char *sname;

    pmon ="$D1MN";
    sname = "SERVER-NCPI-1A";
    buffer ="STATUS PROCESS P1A^BICUNI1";

    error = SERVERCLASS_SEND_ (pmon,
    (short) strlen(pmon), /* pathmon */
    sname,
    (short) strlen(sname), /* server class */
    buffer,
    (short) strlen(buffer),
    200,
    &countread,
    -1); /* timeout = forever */

    if (error != 0)
    {
    error2 = SERVERCLASS_SEND_INFO_ (&pserror, &fserror);
    printf ("\nSERVERCLASS_SEND_ error = %d, pathsend error = %d, fs error = %d\n", error, pserror, fserror);
    exit (1);
    }
    else
    {
    buffer [countread] = 0;
    printf ("\nReply = %s\n", buffer);
    }
    }
    ----------------------------------------------------------------------------------------------------------------
    Response:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 12

    Best Regards,
    Uros
    Uros,

    Keith and Randall gave very valuable responses.

    Also one other possibility is that, in creating the link, the PATHMON tried to start a server process.
    If that server process has a fixed PROCESS NAME for each isntance, and if there is already a running process with that name,
    the attempt to start the process would get an error 12. Look at the info ("PATHCOM $D1MN;INFO SERVER-NCPI-1A") and
    check what is in the "PROCESS". If it's present, there will either be one process name, or a list in paraentheses.
    From a TACL prompt, issue a status command for each process in the list.

    Bill
    Bill,

    Very good remembering that filesystem error 12 is used for attempting to start a process with a name that already exists. I should have remembered that myself. Unless Pathway's link management also uses filesystem error 12 for other problems, I'd
    say a duplicate process name is likely to be the explanation for this problem. Perhaps Uros has set up a test environment by duplicating the configuration of an existing environment and did not know to change the configured fixed server process names.
    Hi,

    Thank you all for your help.

    I changed the code:
    1) I added SERVERCLASS_SEND_INFO output error number to see if command was succsesfully processed.
    2) I changed the buffer to a 200-byte array.
    3) I find some tal example of a similar program and I noticed that this tal program, sends the command to a different pathway server. I send it to the SERVER-NCPI-1A server, which is a server for P1A^NODE. But the tal program sends the command to the
    server SERVER-NCP, which sees all "node" servers.

    It is interesting because if I send a command to SERVER-NCP I get a different error code.
    SERVER-NCP:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 21

    SERVER-NCP-1A:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 12

    I think that the correct server is a SERVER-NCP.

    ---------------------------------------------------------------------------------------------------------------------------------------------
    Pahway server configuration:
    MAXLINKMONS 20 [CURRENTLY 2]

    SERVER SERVER-NCPI-1A
    LINKDEPTH 1
    MAXLINKS 32
    MAXSERVERS 3
    PROCESS $D1AU (ASSOCIATIVE ON)

    SERVER SERVER-NCP
    LINKDEPTH 32
    MAXLINKS 32
    MAXSERVERS 3
    PROCESS $D1C1
    PROCESS $D1C2
    PROCESS $D1C3
    ---------------------------------------------------------------------------------------------------------------------------------------------
    code:
    #include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <tal.h>
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> nolist >main()
    {
    short error, error2, pserror, fserror,countread;
    char *pmon;
    char buffer [200]={0};
    char *sname;

    pmon ="$D1MN";
    sname = "SERVER-NCP";
    strcpy(buffer,"STATUS PROCESS P1A^BICUNI1");

    error = SERVERCLASS_SEND_ (pmon,
    (short)strlen(pmon), /* pathmon */
    sname,
    (short)strlen(sname), /* server class */
    buffer,
    (short)strlen(buffer),
    200,
    &countread,
    -1); /* timeout = forever */
    if (error != 0)
    {
    error2 = SERVERCLASS_SEND_INFO_ (&pserror, &fserror); printf("\nSERVERCLASS_SEND_INFO error = %d \nSERVERCLASS_SEND_ error = %d, pathsend error = %d, fs error = %d\n",error2, error, pserror, fserror);
    printf("\nBuffer size = %d\n", strlen(buffer));

    int i;
    for(i=0; i<strlen(buffer); i++)
    {
    printf("%c",buffer[i]);
    }
    printf("\n\n\n");
    exit (1);
    }
    else
    {
    buffer [countread] = 0;
    printf ("\nReply = %s\n", buffer);
    }
    }
    I see the original server was setup with 'Asoociative On' It's possible the open table in the server can't accept another open.

    Can't explain the error 21.

    I would try changing PMON and SNAME from pointers to arrays and see if it doesn't help with the error 21.

    char pmon[] = "$D1NM";
    char sname[] = "SERVER-NCP";

    Dave

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From uros kusar@21:1/5 to All on Wed Jun 2 01:54:13 2021
    torek, 01. junij 2021 ob 14:10:00 UTC+2 je oseba Dave Bossi napisala:
    On Monday, May 31, 2021 at 3:59:31 PM UTC-4, Bill Honaker wrote:
    On Mon, 31 May 2021 04:07:05 -0700 (PDT), uros kusar <uros....@gmail.com> wrote:

    petek, 28. maj 2021 ob 22:22:59 UTC+2 je oseba rkd...@gmail.com napisala: >> On Friday, May 28, 2021 at 12:49:03 PM UTC-7, Bill Honaker wrote:
    On Fri, 28 May 2021 00:06:17 -0700 (PDT), uros kusar <uros....@gmail.com> wrote:

    Hi,
    I'm writing C program that would get the status of the xpnet objects (stations,processes,node...). I'm using procedures described in the HP manuals(Pathsend and Server programming Manual, C/C++ programmer's Guide...) but I can't get anyting
    from Pathway except errors. Can you tell me what am I doing wrong?

    This is the code that I'm working on:
    ----------------------------------------------------------------------------------------------------------------
    include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> nolist
    #include <tal.h>

    main()
    {
    short error, error2,pserror, fserror,countread;
    char *pmon;
    char *buffer;
    char *sname;

    pmon ="$D1MN";
    sname = "SERVER-NCPI-1A";
    buffer ="STATUS PROCESS P1A^BICUNI1";

    error = SERVERCLASS_SEND_ (pmon,
    (short) strlen(pmon), /* pathmon */
    sname,
    (short) strlen(sname), /* server class */
    buffer,
    (short) strlen(buffer),
    200,
    &countread,
    -1); /* timeout = forever */

    if (error != 0)
    {
    error2 = SERVERCLASS_SEND_INFO_ (&pserror, &fserror);
    printf ("\nSERVERCLASS_SEND_ error = %d, pathsend error = %d, fs error = %d\n", error, pserror, fserror);
    exit (1);
    }
    else
    {
    buffer [countread] = 0;
    printf ("\nReply = %s\n", buffer);
    }
    }
    ----------------------------------------------------------------------------------------------------------------
    Response:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 12 >> > >
    Best Regards,
    Uros
    Uros,

    Keith and Randall gave very valuable responses.

    Also one other possibility is that, in creating the link, the PATHMON tried to start a server process.
    If that server process has a fixed PROCESS NAME for each isntance, and if there is already a running process with that name,
    the attempt to start the process would get an error 12. Look at the info ("PATHCOM $D1MN;INFO SERVER-NCPI-1A") and
    check what is in the "PROCESS". If it's present, there will either be one process name, or a list in paraentheses.
    From a TACL prompt, issue a status command for each process in the list.

    Bill
    Bill,

    Very good remembering that filesystem error 12 is used for attempting to start a process with a name that already exists. I should have remembered that myself. Unless Pathway's link management also uses filesystem error 12 for other problems, I'd
    say a duplicate process name is likely to be the explanation for this problem. Perhaps Uros has set up a test environment by duplicating the configuration of an existing environment and did not know to change the configured fixed server process names.
    Hi,

    Thank you all for your help.

    I changed the code:
    1) I added SERVERCLASS_SEND_INFO output error number to see if command was succsesfully processed.
    2) I changed the buffer to a 200-byte array.
    3) I find some tal example of a similar program and I noticed that this tal program, sends the command to a different pathway server. I send it to the SERVER-NCPI-1A server, which is a server for P1A^NODE. But the tal program sends the command to
    the server SERVER-NCP, which sees all "node" servers.

    It is interesting because if I send a command to SERVER-NCP I get a different error code.
    SERVER-NCP:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 21

    SERVER-NCP-1A:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 12

    I think that the correct server is a SERVER-NCP.

    ---------------------------------------------------------------------------------------------------------------------------------------------
    Pahway server configuration:
    MAXLINKMONS 20 [CURRENTLY 2]

    SERVER SERVER-NCPI-1A
    LINKDEPTH 1
    MAXLINKS 32
    MAXSERVERS 3
    PROCESS $D1AU (ASSOCIATIVE ON)

    SERVER SERVER-NCP
    LINKDEPTH 32
    MAXLINKS 32
    MAXSERVERS 3
    PROCESS $D1C1
    PROCESS $D1C2
    PROCESS $D1C3
    ---------------------------------------------------------------------------------------------------------------------------------------------
    code:
    #include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <tal.h>
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> nolist >main()
    {
    short error, error2, pserror, fserror,countread;
    char *pmon;
    char buffer [200]={0};
    char *sname;

    pmon ="$D1MN";
    sname = "SERVER-NCP";
    strcpy(buffer,"STATUS PROCESS P1A^BICUNI1");

    error = SERVERCLASS_SEND_ (pmon,
    (short)strlen(pmon), /* pathmon */
    sname,
    (short)strlen(sname), /* server class */
    buffer,
    (short)strlen(buffer),
    200,
    &countread,
    -1); /* timeout = forever */
    if (error != 0)
    {
    error2 = SERVERCLASS_SEND_INFO_ (&pserror, &fserror); printf("\nSERVERCLASS_SEND_INFO error = %d \nSERVERCLASS_SEND_ error = %d, pathsend error = %d, fs error = %d\n",error2, error, pserror, fserror);
    printf("\nBuffer size = %d\n", strlen(buffer));

    int i;
    for(i=0; i<strlen(buffer); i++)
    {
    printf("%c",buffer[i]);
    }
    printf("\n\n\n");
    exit (1);
    }
    else
    {
    buffer [countread] = 0;
    printf ("\nReply = %s\n", buffer);
    }
    }
    I see the original server was setup with 'Asoociative On' It's possible the open table in the server can't accept another open.

    Can't explain the error 21.
    I would try changing PMON and SNAME from pointers to arrays and see if it doesn't help with the error 21.

    char pmon[] = "$D1MN";
    char sname[] = "SERVER-NCP";

    Dave

    Hi,

    Keith, I don't find anything in the manuals, that would show me what to send to the server.

    I did not post the complete output to make this thread readable as possible. The SERVERCLASS_SEND_INFO returns 0(OK) and I tried different data types, also arrays instead of pointers. The result is the same. I'm almost sure that I need to send command to
    the SERVER-NCP server instead the SERVER-NCPI-1A.

    Currently I'm using arrays:

    char pmon[5]={0};
    char buffer [200]={0};
    char sname[20]={0};

    strcpy(pmon,"$D1MN");
    strcpy(sname,"SERVER-NCP");
    strcpy(buffer,"STATUS PROCESS P1A^BICUNI1");

    error = SERVERCLASS_SEND_ (pmon,
    (short)strlen(pmon), /* pathmon */
    sname,
    (short)strlen(sname), /* server class */
    buffer,
    (short)strlen(buffer),
    200,
    &countread,
    -1); /* timeout = forever */

    OUTPUT:
    SERVERCLASS_SEND_INFO error = 0
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 21

    Buffer size = 26
    STATUS PROCESS P1A^BICUNI1


    EMS messages:

    21-06-02;10:03:23.101 \PERUN.$D1MN TANDEM.PATHWAY.L01 3116
    \PERUN.$D1MN: ERROR - *3116* LINKMON L\PERUN.$ZP01,
    ERROR DURING SERVER I/O (21) - SERVER SERVER-NCP

    21-06-02;10:03:23.102 \PERUN.$D1SUD TANDEM.VHS.L01 6
    DEV1VHS:
    02JUN21,10:03 $D1MN: ERROR - *3116* LINKMON L\PERUN.$ZP01, ERROR
    DURING SERVER I/O (21) - SERVER SERVER-NCP. Display text received
    from process $D1MN. Program file \PERUN.$SYSTEM.SYSTEM.PATHMON.
    Primary log file \PERUN.$DATA01.DEV1VHS.LOG0000.

    I'm losing ideas what else to try.

    Uros

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From uros kusar@21:1/5 to All on Wed Jun 2 02:42:12 2021
    sreda, 02. junij 2021 ob 10:54:14 UTC+2 je oseba uros kusar napisala:
    torek, 01. junij 2021 ob 14:10:00 UTC+2 je oseba Dave Bossi napisala:
    On Monday, May 31, 2021 at 3:59:31 PM UTC-4, Bill Honaker wrote:
    On Mon, 31 May 2021 04:07:05 -0700 (PDT), uros kusar <uros....@gmail.com> wrote:

    petek, 28. maj 2021 ob 22:22:59 UTC+2 je oseba rkd...@gmail.com napisala:
    On Friday, May 28, 2021 at 12:49:03 PM UTC-7, Bill Honaker wrote:
    On Fri, 28 May 2021 00:06:17 -0700 (PDT), uros kusar <uros....@gmail.com> wrote:

    Hi,
    I'm writing C program that would get the status of the xpnet objects (stations,processes,node...). I'm using procedures described in the HP manuals(Pathsend and Server programming Manual, C/C++ programmer's Guide...) but I can't get anyting
    from Pathway except errors. Can you tell me what am I doing wrong?

    This is the code that I'm working on:
    ----------------------------------------------------------------------------------------------------------------
    include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> nolist
    #include <tal.h>

    main()
    {
    short error, error2,pserror, fserror,countread;
    char *pmon;
    char *buffer;
    char *sname;

    pmon ="$D1MN";
    sname = "SERVER-NCPI-1A";
    buffer ="STATUS PROCESS P1A^BICUNI1";

    error = SERVERCLASS_SEND_ (pmon,
    (short) strlen(pmon), /* pathmon */
    sname,
    (short) strlen(sname), /* server class */
    buffer,
    (short) strlen(buffer),
    200,
    &countread,
    -1); /* timeout = forever */

    if (error != 0)
    {
    error2 = SERVERCLASS_SEND_INFO_ (&pserror, &fserror);
    printf ("\nSERVERCLASS_SEND_ error = %d, pathsend error = %d, fs error = %d\n", error, pserror, fserror);
    exit (1);
    }
    else
    {
    buffer [countread] = 0;
    printf ("\nReply = %s\n", buffer);
    }
    }
    ----------------------------------------------------------------------------------------------------------------
    Response:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 12 >> > >
    Best Regards,
    Uros
    Uros,

    Keith and Randall gave very valuable responses.

    Also one other possibility is that, in creating the link, the PATHMON tried to start a server process.
    If that server process has a fixed PROCESS NAME for each isntance, and if there is already a running process with that name,
    the attempt to start the process would get an error 12. Look at the info ("PATHCOM $D1MN;INFO SERVER-NCPI-1A") and
    check what is in the "PROCESS". If it's present, there will either be one process name, or a list in paraentheses.
    From a TACL prompt, issue a status command for each process in the list.

    Bill
    Bill,

    Very good remembering that filesystem error 12 is used for attempting to start a process with a name that already exists. I should have remembered that myself. Unless Pathway's link management also uses filesystem error 12 for other problems, I'
    d say a duplicate process name is likely to be the explanation for this problem. Perhaps Uros has set up a test environment by duplicating the configuration of an existing environment and did not know to change the configured fixed server process names.
    Hi,

    Thank you all for your help.

    I changed the code:
    1) I added SERVERCLASS_SEND_INFO output error number to see if command was succsesfully processed.
    2) I changed the buffer to a 200-byte array.
    3) I find some tal example of a similar program and I noticed that this tal program, sends the command to a different pathway server. I send it to the SERVER-NCPI-1A server, which is a server for P1A^NODE. But the tal program sends the command to
    the server SERVER-NCP, which sees all "node" servers.

    It is interesting because if I send a command to SERVER-NCP I get a different error code.
    SERVER-NCP:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 21

    SERVER-NCP-1A:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 12

    I think that the correct server is a SERVER-NCP.

    ---------------------------------------------------------------------------------------------------------------------------------------------
    Pahway server configuration:
    MAXLINKMONS 20 [CURRENTLY 2]

    SERVER SERVER-NCPI-1A
    LINKDEPTH 1
    MAXLINKS 32
    MAXSERVERS 3
    PROCESS $D1AU (ASSOCIATIVE ON)

    SERVER SERVER-NCP
    LINKDEPTH 32
    MAXLINKS 32
    MAXSERVERS 3
    PROCESS $D1C1
    PROCESS $D1C2
    PROCESS $D1C3
    ---------------------------------------------------------------------------------------------------------------------------------------------
    code:
    #include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <tal.h>
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> nolist >main()
    {
    short error, error2, pserror, fserror,countread;
    char *pmon;
    char buffer [200]={0};
    char *sname;

    pmon ="$D1MN";
    sname = "SERVER-NCP";
    strcpy(buffer,"STATUS PROCESS P1A^BICUNI1");

    error = SERVERCLASS_SEND_ (pmon,
    (short)strlen(pmon), /* pathmon */
    sname,
    (short)strlen(sname), /* server class */
    buffer,
    (short)strlen(buffer),
    200,
    &countread,
    -1); /* timeout = forever */
    if (error != 0)
    {
    error2 = SERVERCLASS_SEND_INFO_ (&pserror, &fserror); printf("\nSERVERCLASS_SEND_INFO error = %d \nSERVERCLASS_SEND_ error = %d, pathsend error = %d, fs error = %d\n",error2, error, pserror, fserror);
    printf("\nBuffer size = %d\n", strlen(buffer));

    int i;
    for(i=0; i<strlen(buffer); i++)
    {
    printf("%c",buffer[i]);
    }
    printf("\n\n\n");
    exit (1);
    }
    else
    {
    buffer [countread] = 0;
    printf ("\nReply = %s\n", buffer);
    }
    }
    I see the original server was setup with 'Asoociative On' It's possible the open table in the server can't accept another open.

    Can't explain the error 21.
    I would try changing PMON and SNAME from pointers to arrays and see if it doesn't help with the error 21.

    char pmon[] = "$D1MN";
    char sname[] = "SERVER-NCP";

    Dave
    Hi,

    Keith, I don't find anything in the manuals, that would show me what to send to the server.

    I did not post the complete output to make this thread readable as possible. The SERVERCLASS_SEND_INFO returns 0(OK) and I tried different data types, also arrays instead of pointers. The result is the same. I'm almost sure that I need to send command
    to the SERVER-NCP server instead the SERVER-NCPI-1A.

    Currently I'm using arrays:

    char pmon[5]={0};
    char buffer [200]={0};
    char sname[20]={0};

    strcpy(pmon,"$D1MN");
    strcpy(sname,"SERVER-NCP");
    strcpy(buffer,"STATUS PROCESS P1A^BICUNI1");

    error = SERVERCLASS_SEND_ (pmon,
    (short)strlen(pmon), /* pathmon */
    sname,
    (short)strlen(sname), /* server class */
    buffer,
    (short)strlen(buffer),
    200,
    &countread,
    -1); /* timeout = forever */
    OUTPUT:
    SERVERCLASS_SEND_INFO error = 0
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 21
    Buffer size = 26
    STATUS PROCESS P1A^BICUNI1


    EMS messages:

    21-06-02;10:03:23.101 \PERUN.$D1MN TANDEM.PATHWAY.L01 3116
    \PERUN.$D1MN: ERROR - *3116* LINKMON L\PERUN.$ZP01,
    ERROR DURING SERVER I/O (21) - SERVER SERVER-NCP

    21-06-02;10:03:23.102 \PERUN.$D1SUD TANDEM.VHS.L01 6
    DEV1VHS:
    02JUN21,10:03 $D1MN: ERROR - *3116* LINKMON L\PERUN.$ZP01, ERROR
    DURING SERVER I/O (21) - SERVER SERVER-NCP. Display text received
    from process $D1MN. Program file \PERUN.$SYSTEM.SYSTEM.PATHMON.
    Primary log file \PERUN.$DATA01.DEV1VHS.LOG0000.

    I'm losing ideas what else to try.

    Uros

    I just notice another EMS error in collector $0

    21-06-02;11:39:59.662 \PERUN.$ZL01 TANDEM.APPCLSTR.L01 1038
    WARNING 1038 - Server \PERUN.$D1MN.SERVER-NCP file
    operation ACS_FS_PSWRITEREAD_() failed, process
    \PERUN.$D1C1:115841149, file \PERUN.$D1C1, error 21

    Uros

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Keith Dick@21:1/5 to uros kusar on Wed Jun 2 05:55:12 2021
    On Wednesday, June 2, 2021 at 2:42:13 AM UTC-7, uros kusar wrote:
    sreda, 02. junij 2021 ob 10:54:14 UTC+2 je oseba uros kusar napisala:
    torek, 01. junij 2021 ob 14:10:00 UTC+2 je oseba Dave Bossi napisala:
    On Monday, May 31, 2021 at 3:59:31 PM UTC-4, Bill Honaker wrote:
    On Mon, 31 May 2021 04:07:05 -0700 (PDT), uros kusar <uros....@gmail.com> wrote:

    petek, 28. maj 2021 ob 22:22:59 UTC+2 je oseba rkd...@gmail.com napisala:
    On Friday, May 28, 2021 at 12:49:03 PM UTC-7, Bill Honaker wrote: >> > On Fri, 28 May 2021 00:06:17 -0700 (PDT), uros kusar <uros....@gmail.com> wrote:

    Hi,
    I'm writing C program that would get the status of the xpnet objects (stations,processes,node...). I'm using procedures described in the HP manuals(Pathsend and Server programming Manual, C/C++ programmer's Guide...) but I can't get anyting
    from Pathway except errors. Can you tell me what am I doing wrong?

    This is the code that I'm working on:
    ----------------------------------------------------------------------------------------------------------------
    include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> nolist
    #include <tal.h>

    main()
    {
    short error, error2,pserror, fserror,countread;
    char *pmon;
    char *buffer;
    char *sname;

    pmon ="$D1MN";
    sname = "SERVER-NCPI-1A";
    buffer ="STATUS PROCESS P1A^BICUNI1";

    error = SERVERCLASS_SEND_ (pmon,
    (short) strlen(pmon), /* pathmon */
    sname,
    (short) strlen(sname), /* server class */
    buffer,
    (short) strlen(buffer),
    200,
    &countread,
    -1); /* timeout = forever */

    if (error != 0)
    {
    error2 = SERVERCLASS_SEND_INFO_ (&pserror, &fserror);
    printf ("\nSERVERCLASS_SEND_ error = %d, pathsend error = %d, fs error = %d\n", error, pserror, fserror);
    exit (1);
    }
    else
    {
    buffer [countread] = 0;
    printf ("\nReply = %s\n", buffer);
    }
    }
    ----------------------------------------------------------------------------------------------------------------
    Response:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 12

    Best Regards,
    Uros
    Uros,

    Keith and Randall gave very valuable responses.

    Also one other possibility is that, in creating the link, the PATHMON tried to start a server process.
    If that server process has a fixed PROCESS NAME for each isntance, and if there is already a running process with that name,
    the attempt to start the process would get an error 12. Look at the info ("PATHCOM $D1MN;INFO SERVER-NCPI-1A") and
    check what is in the "PROCESS". If it's present, there will either be one process name, or a list in paraentheses.
    From a TACL prompt, issue a status command for each process in the list.

    Bill
    Bill,

    Very good remembering that filesystem error 12 is used for attempting to start a process with a name that already exists. I should have remembered that myself. Unless Pathway's link management also uses filesystem error 12 for other problems,
    I'd say a duplicate process name is likely to be the explanation for this problem. Perhaps Uros has set up a test environment by duplicating the configuration of an existing environment and did not know to change the configured fixed server process names.

    Hi,

    Thank you all for your help.

    I changed the code:
    1) I added SERVERCLASS_SEND_INFO output error number to see if command was succsesfully processed.
    2) I changed the buffer to a 200-byte array.
    3) I find some tal example of a similar program and I noticed that this tal program, sends the command to a different pathway server. I send it to the SERVER-NCPI-1A server, which is a server for P1A^NODE. But the tal program sends the command
    to the server SERVER-NCP, which sees all "node" servers.

    It is interesting because if I send a command to SERVER-NCP I get a different error code.
    SERVER-NCP:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 21

    SERVER-NCP-1A:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 12

    I think that the correct server is a SERVER-NCP.

    ---------------------------------------------------------------------------------------------------------------------------------------------
    Pahway server configuration:
    MAXLINKMONS 20 [CURRENTLY 2]

    SERVER SERVER-NCPI-1A
    LINKDEPTH 1
    MAXLINKS 32
    MAXSERVERS 3
    PROCESS $D1AU (ASSOCIATIVE ON)

    SERVER SERVER-NCP
    LINKDEPTH 32
    MAXLINKS 32
    MAXSERVERS 3
    PROCESS $D1C1
    PROCESS $D1C2
    PROCESS $D1C3
    ---------------------------------------------------------------------------------------------------------------------------------------------
    code:
    #include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <tal.h>
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> nolist
    main()
    {
    short error, error2, pserror, fserror,countread;
    char *pmon;
    char buffer [200]={0};
    char *sname;

    pmon ="$D1MN";
    sname = "SERVER-NCP";
    strcpy(buffer,"STATUS PROCESS P1A^BICUNI1");

    error = SERVERCLASS_SEND_ (pmon,
    (short)strlen(pmon), /* pathmon */
    sname,
    (short)strlen(sname), /* server class */
    buffer,
    (short)strlen(buffer),
    200,
    &countread,
    -1); /* timeout = forever */
    if (error != 0)
    {
    error2 = SERVERCLASS_SEND_INFO_ (&pserror, &fserror); printf("\nSERVERCLASS_SEND_INFO error = %d \nSERVERCLASS_SEND_ error = %d, pathsend error = %d, fs error = %d\n",error2, error, pserror, fserror);
    printf("\nBuffer size = %d\n", strlen(buffer));

    int i;
    for(i=0; i<strlen(buffer); i++)
    {
    printf("%c",buffer[i]);
    }
    printf("\n\n\n");
    exit (1);
    }
    else
    {
    buffer [countread] = 0;
    printf ("\nReply = %s\n", buffer);
    }
    }
    I see the original server was setup with 'Asoociative On' It's possible the open table in the server can't accept another open.

    Can't explain the error 21.
    I would try changing PMON and SNAME from pointers to arrays and see if it doesn't help with the error 21.

    char pmon[] = "$D1MN";
    char sname[] = "SERVER-NCP";

    Dave
    Hi,

    Keith, I don't find anything in the manuals, that would show me what to send to the server.

    I did not post the complete output to make this thread readable as possible. The SERVERCLASS_SEND_INFO returns 0(OK) and I tried different data types, also arrays instead of pointers. The result is the same. I'm almost sure that I need to send
    command to the SERVER-NCP server instead the SERVER-NCPI-1A.

    Currently I'm using arrays:

    char pmon[5]={0};
    char buffer [200]={0};
    char sname[20]={0};

    strcpy(pmon,"$D1MN");
    strcpy(sname,"SERVER-NCP");
    strcpy(buffer,"STATUS PROCESS P1A^BICUNI1");

    error = SERVERCLASS_SEND_ (pmon,
    (short)strlen(pmon), /* pathmon */
    sname,
    (short)strlen(sname), /* server class */
    buffer,
    (short)strlen(buffer),
    200,
    &countread,
    -1); /* timeout = forever */
    OUTPUT:
    SERVERCLASS_SEND_INFO error = 0
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 21
    Buffer size = 26
    STATUS PROCESS P1A^BICUNI1


    EMS messages:

    21-06-02;10:03:23.101 \PERUN.$D1MN TANDEM.PATHWAY.L01 3116
    \PERUN.$D1MN: ERROR - *3116* LINKMON L\PERUN.$ZP01,
    ERROR DURING SERVER I/O (21) - SERVER SERVER-NCP

    21-06-02;10:03:23.102 \PERUN.$D1SUD TANDEM.VHS.L01 6
    DEV1VHS:
    02JUN21,10:03 $D1MN: ERROR - *3116* LINKMON L\PERUN.$ZP01, ERROR
    DURING SERVER I/O (21) - SERVER SERVER-NCP. Display text received
    from process $D1MN. Program file \PERUN.$SYSTEM.SYSTEM.PATHMON.
    Primary log file \PERUN.$DATA01.DEV1VHS.LOG0000.

    I'm losing ideas what else to try.

    Uros
    I just notice another EMS error in collector $0

    21-06-02;11:39:59.662 \PERUN.$ZL01 TANDEM.APPCLSTR.L01 1038
    WARNING 1038 - Server \PERUN.$D1MN.SERVER-NCP file
    operation ACS_FS_PSWRITEREAD_() failed, process
    \PERUN.$D1C1:115841149, file \PERUN.$D1C1, error 21

    Uros

    Hi Uros,

    Do you have any indication that the Pathway server you are trying to use is intended for a user such as yourself to access directly using SERVERCLASS_SEND_ ? You mentioned that you found a TAL program that sends commands to SERVER-NCP. Where did you
    find that example program? Perhaps if I looked at that TAL program, it would help me understand what you could be doing wrong.

    I have a feeling that you are trying to do something that a user such as you is not intended to do, and that whatever task you are trying to do needs to be approached in some other way. That is only my feeling, based on very little evidence, so don't
    give up on this program based only on my feeling, because my feeling could be wrong. As I said earlier, I know nothing about xpnet.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From JShepherd@21:1/5 to All on Wed Jun 2 19:03:39 2021
    In article <09b4463e-7df3-4a59-a62c-6040a6f29082n@googlegroups.com>, uros.kusar@gmail.com says...

    sreda, 02. junij 2021 ob 10:54:14 UTC+2 je oseba uros kusar napisala:
    torek, 01. junij 2021 ob 14:10:00 UTC+2 je oseba Dave Bossi napisala:
    On Monday, May 31, 2021 at 3:59:31 PM UTC-4, Bill Honaker wrote:=20
    On Mon, 31 May 2021 04:07:05 -0700 (PDT), uros kusar <uros....@gmail.= >com> wrote:=20
    =20
    petek, 28. maj 2021 ob 22:22:59 UTC+2 je oseba rkd...@gmail.com napi= >sala:=20
    On Friday, May 28, 2021 at 12:49:03 PM UTC-7, Bill Honaker wrote:= >=20
    On Fri, 28 May 2021 00:06:17 -0700 (PDT), uros kusar <uros....@g= >mail.com> wrote:=20
    =20
    Hi,=20
    I'm writing C program that would get the status of the xpnet ob= >jects (stations,processes,node...). I'm using procedures described in the H= >P manuals(Pathsend and Server programming Manual, C/C++ programmer's Guide.= >..) but I can't get anyting from Pathway except errors. Can you tell me wha= >t am I doing wrong?=20
    =20
    This is the code that I'm working on:=20
    ---------------------------------------------------------------= >-------------------------------------------------=20
    include <stdlib.h>=20
    #include <stdio.h>=20
    #include <string.h>=20
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)>=
    nolist=20
    #include <tal.h>=20
    =20
    main()=20
    {=20
    short error, error2,pserror, fserror,countread;=20
    char *pmon;=20
    char *buffer;=20
    char *sname;=20
    =20
    pmon =3D"$D1MN";=20
    sname =3D "SERVER-NCPI-1A";=20
    buffer =3D"STATUS PROCESS P1A^BICUNI1";=20
    =20
    error =3D SERVERCLASS_SEND_ (pmon,=20
    (short) strlen(pmon), /* pathmon */=20
    sname,=20
    (short) strlen(sname), /* server class */=20
    buffer,=20
    (short) strlen(buffer),=20
    200,=20
    &countread,=20
    -1); /* timeout =3D forever */=20
    =20
    if (error !=3D 0)=20
    {=20
    error2 =3D SERVERCLASS_SEND_INFO_ (&pserror, &fserror);=20
    printf ("\nSERVERCLASS_SEND_ error =3D %d, pathsend error =3D = >%d, fs error =3D %d\n", error, pserror, fserror);=20
    exit (1);=20
    }=20
    else=20
    {=20
    buffer [countread] =3D 0;=20
    printf ("\nReply =3D %s\n", buffer);=20
    }=20
    }=20
    ---------------------------------------------------------------= >-------------------------------------------------=20
    Response:=20
    SERVERCLASS_SEND_ error =3D 233, pathsend error =3D 904, fs err= >or =3D 12=20
    =20
    Best Regards,=20
    Uros=20
    Uros,=20
    =20
    Keith and Randall gave very valuable responses.=20
    =20
    Also one other possibility is that, in creating the link, the PA= >THMON tried to start a server process.=20
    If that server process has a fixed PROCESS NAME for each isntanc= >e, and if there is already a running process with that name,=20
    the attempt to start the process would get an error 12. Look at = >the info ("PATHCOM $D1MN;INFO SERVER-NCPI-1A") and=20
    check what is in the "PROCESS". If it's present, there will eith= >er be one process name, or a list in paraentheses.=20
    From a TACL prompt, issue a status command for each process in t= >he list.=20
    =20
    Bill=20
    Bill,=20
    =20
    Very good remembering that filesystem error 12 is used for attempt= >ing to start a process with a name that already exists. I should have remem= >bered that myself. Unless Pathway's link management also uses filesystem er= >ror 12 for other problems, I'd say a duplicate process name is likely to be=
    the explanation for this problem. Perhaps Uros has set up a test environme=
    nt by duplicating the configuration of an existing environment and did not = >know to change the configured fixed server process names.=20
    Hi,=20
    =20
    Thank you all for your help.=20
    =20
    I changed the code:=20
    1) I added SERVERCLASS_SEND_INFO output error number to see if comma= >nd was succsesfully processed.=20
    2) I changed the buffer to a 200-byte array.=20
    3) I find some tal example of a similar program and I noticed that t= >his tal program, sends the command to a different pathway server. I send it=
    to the SERVER-NCPI-1A server, which is a server for P1A^NODE. But the tal =
    program sends the command to the server SERVER-NCP, which sees all "node" s= >ervers.=20
    =20
    It is interesting because if I send a command to SERVER-NCP I get a = >different error code.=20
    SERVER-NCP:=20
    SERVERCLASS_SEND_ error =3D 233, pathsend error =3D 904, fs error = >=3D 21=20
    =20
    SERVER-NCP-1A:=20
    SERVERCLASS_SEND_ error =3D 233, pathsend error =3D 904, fs error = >=3D 12=20
    =20
    I think that the correct server is a SERVER-NCP.=20
    =20
    --------------------------------------------------------------------= >-------------------------------------------------------------------------= >=20
    Pahway server configuration:=20
    MAXLINKMONS 20 [CURRENTLY 2]=20
    =20
    SERVER SERVER-NCPI-1A=20
    LINKDEPTH 1=20
    MAXLINKS 32=20
    MAXSERVERS 3=20
    PROCESS $D1AU (ASSOCIATIVE ON)=20
    =20
    SERVER SERVER-NCP=20
    LINKDEPTH 32=20
    MAXLINKS 32=20
    MAXSERVERS 3=20
    PROCESS $D1C1=20
    PROCESS $D1C2=20
    PROCESS $D1C3=20
    --------------------------------------------------------------------= >-------------------------------------------------------------------------= >=20
    code:=20
    #include <stdlib.h>=20
    #include <stdio.h>=20
    #include <string.h>=20
    #include <tal.h>=20
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> noli= >st=20
    main()=20
    {=20
    short error, error2, pserror, fserror,countread;=20
    char *pmon;=20
    char buffer [200]=3D{0};=20
    char *sname;=20
    =20
    pmon =3D"$D1MN";=20
    sname =3D "SERVER-NCP";=20
    strcpy(buffer,"STATUS PROCESS P1A^BICUNI1");=20
    =20
    error =3D SERVERCLASS_SEND_ (pmon,=20
    (short)strlen(pmon), /* pathmon */=20
    sname,=20
    (short)strlen(sname), /* server class */=20
    buffer,=20
    (short)strlen(buffer),=20
    200,=20
    &countread,=20
    -1); /* timeout =3D forever */=20
    if (error !=3D 0)=20
    {=20
    error2 =3D SERVERCLASS_SEND_INFO_ (&pserror, &fserror);=20
    printf("\nSERVERCLASS_SEND_INFO error =3D %d \nSERVERCLASS_SEND_ er= >ror =3D %d, pathsend error =3D %d, fs error =3D %d\n",error2, error, pserro= >r, fserror);=20
    printf("\nBuffer size =3D %d\n", strlen(buffer));=20
    =20
    int i;=20
    for(i=3D0; i<strlen(buffer); i++)=20
    {=20
    printf("%c",buffer[i]);=20
    }=20
    printf("\n\n\n");=20
    exit (1);=20
    }=20
    else=20
    {=20
    buffer [countread] =3D 0;=20
    printf ("\nReply =3D %s\n", buffer);=20
    }=20
    }=20
    I see the original server was setup with 'Asoociative On' It's possib= >le the open table in the server can't accept another open.=20
    =20
    Can't explain the error 21.=20
    I would try changing PMON and SNAME from pointers to arrays and see if = >it doesn't help with the error 21.=20

    char pmon[] =3D "$D1MN";
    char sname[] =3D "SERVER-NCP";=20
    =20
    Dave
    Hi,=20
    =20
    Keith, I don't find anything in the manuals, that would show me what to s= >end to the server.=20
    =20
    I did not post the complete output to make this thread readable as possib= >le. The SERVERCLASS_SEND_INFO returns 0(OK) and I tried different data type= >s, also arrays instead of pointers. The result is the same. I'm almost sure=
    that I need to send command to the SERVER-NCP server instead the SERVER-NC=
    PI-1A.=20
    =20
    Currently I'm using arrays:=20
    =20
    char pmon[5]=3D{0};
    char buffer [200]=3D{0};
    char sname[20]=3D{0};=20
    =20
    strcpy(pmon,"$D1MN");=20
    strcpy(sname,"SERVER-NCP");
    strcpy(buffer,"STATUS PROCESS P1A^BICUNI1");=20
    =20
    error =3D SERVERCLASS_SEND_ (pmon,=20
    (short)strlen(pmon), /* pathmon */=20
    sname,=20
    (short)strlen(sname), /* server class */=20
    buffer,=20
    (short)strlen(buffer),=20
    200,=20
    &countread,=20
    -1); /* timeout =3D forever */
    OUTPUT:=20
    SERVERCLASS_SEND_INFO error =3D 0
    SERVERCLASS_SEND_ error =3D 233, pathsend error =3D 904, fs error =3D 21
    Buffer size =3D 26=20
    STATUS PROCESS P1A^BICUNI1=20
    =20
    =20
    EMS messages:=20
    =20
    21-06-02;10:03:23.101 \PERUN.$D1MN TANDEM.PATHWAY.L01 3116=20
    \PERUN.$D1MN: ERROR - *3116* LINKMON L\PERUN.$ZP01,=20
    ERROR DURING SERVER I/O (21) - SERVER SERVER-NCP=20
    =20
    21-06-02;10:03:23.102 \PERUN.$D1SUD TANDEM.VHS.L01 6=20
    DEV1VHS:=20
    02JUN21,10:03 $D1MN: ERROR - *3116* LINKMON L\PERUN.$ZP01, ERROR=20
    DURING SERVER I/O (21) - SERVER SERVER-NCP. Display text received=20
    from process $D1MN. Program file \PERUN.$SYSTEM.SYSTEM.PATHMON.=20
    Primary log file \PERUN.$DATA01.DEV1VHS.LOG0000.=20
    =20
    I'm losing ideas what else to try.=20
    =20
    Uros

    I just notice another EMS error in collector $0

    21-06-02;11:39:59.662 \PERUN.$ZL01 TANDEM.APPCLSTR.L01 1038
    WARNING 1038 - Server \PERUN.$D1MN.SERVER-NCP file
    operation ACS_FS_PSWRITEREAD_() failed, process
    \PERUN.$D1C1:115841149, file \PERUN.$D1C1, error 21

    Uros


    Are you sure that server accepts a command line text buffer as input ?
    Maybe it requires a structured message.



    =status SERVER-NCPI-1A
    SERVER-NCPI-1A 1

    PROCESS STATE ERROR INFO #LINKS WEIGHT
    $S1AU RUNNING 1 3

    wake /highpin off/ $s1au
    WRITE error 21 on $S1AU

    wake /highpin off/ $s1au send STATUS
    WRITE error 21 on $S1AU

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Randall@21:1/5 to rkd...@gmail.com on Wed Jun 2 11:42:13 2021
    On Wednesday, June 2, 2021 at 8:55:13 a.m. UTC-4, rkd...@gmail.com wrote:
    On Wednesday, June 2, 2021 at 2:42:13 AM UTC-7, uros kusar wrote:
    sreda, 02. junij 2021 ob 10:54:14 UTC+2 je oseba uros kusar napisala:
    torek, 01. junij 2021 ob 14:10:00 UTC+2 je oseba Dave Bossi napisala:
    On Monday, May 31, 2021 at 3:59:31 PM UTC-4, Bill Honaker wrote:
    On Mon, 31 May 2021 04:07:05 -0700 (PDT), uros kusar <uros....@gmail.com> wrote:

    petek, 28. maj 2021 ob 22:22:59 UTC+2 je oseba rkd...@gmail.com napisala:
    On Friday, May 28, 2021 at 12:49:03 PM UTC-7, Bill Honaker wrote: >> > On Fri, 28 May 2021 00:06:17 -0700 (PDT), uros kusar <uros....@gmail.com> wrote:

    Hi,
    I'm writing C program that would get the status of the xpnet objects (stations,processes,node...). I'm using procedures described in the HP manuals(Pathsend and Server programming Manual, C/C++ programmer's Guide...) but I can't get
    anyting from Pathway except errors. Can you tell me what am I doing wrong?

    This is the code that I'm working on:
    ----------------------------------------------------------------------------------------------------------------
    include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> nolist
    #include <tal.h>

    main()
    {
    short error, error2,pserror, fserror,countread;
    char *pmon;
    char *buffer;
    char *sname;

    pmon ="$D1MN";
    sname = "SERVER-NCPI-1A";
    buffer ="STATUS PROCESS P1A^BICUNI1";

    error = SERVERCLASS_SEND_ (pmon,
    (short) strlen(pmon), /* pathmon */
    sname,
    (short) strlen(sname), /* server class */
    buffer,
    (short) strlen(buffer),
    200,
    &countread,
    -1); /* timeout = forever */

    if (error != 0)
    {
    error2 = SERVERCLASS_SEND_INFO_ (&pserror, &fserror);
    printf ("\nSERVERCLASS_SEND_ error = %d, pathsend error = %d, fs error = %d\n", error, pserror, fserror);
    exit (1);
    }
    else
    {
    buffer [countread] = 0;
    printf ("\nReply = %s\n", buffer);
    }
    }
    ----------------------------------------------------------------------------------------------------------------
    Response:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 12

    Best Regards,
    Uros
    Uros,

    Keith and Randall gave very valuable responses.

    Also one other possibility is that, in creating the link, the PATHMON tried to start a server process.
    If that server process has a fixed PROCESS NAME for each isntance, and if there is already a running process with that name,
    the attempt to start the process would get an error 12. Look at the info ("PATHCOM $D1MN;INFO SERVER-NCPI-1A") and
    check what is in the "PROCESS". If it's present, there will either be one process name, or a list in paraentheses.
    From a TACL prompt, issue a status command for each process in the list.

    Bill
    Bill,

    Very good remembering that filesystem error 12 is used for attempting to start a process with a name that already exists. I should have remembered that myself. Unless Pathway's link management also uses filesystem error 12 for other problems,
    I'd say a duplicate process name is likely to be the explanation for this problem. Perhaps Uros has set up a test environment by duplicating the configuration of an existing environment and did not know to change the configured fixed server process
    names.
    Hi,

    Thank you all for your help.

    I changed the code:
    1) I added SERVERCLASS_SEND_INFO output error number to see if command was succsesfully processed.
    2) I changed the buffer to a 200-byte array.
    3) I find some tal example of a similar program and I noticed that this tal program, sends the command to a different pathway server. I send it to the SERVER-NCPI-1A server, which is a server for P1A^NODE. But the tal program sends the command
    to the server SERVER-NCP, which sees all "node" servers.

    It is interesting because if I send a command to SERVER-NCP I get a different error code.
    SERVER-NCP:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 21

    SERVER-NCP-1A:
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 12

    I think that the correct server is a SERVER-NCP.

    ---------------------------------------------------------------------------------------------------------------------------------------------
    Pahway server configuration:
    MAXLINKMONS 20 [CURRENTLY 2]

    SERVER SERVER-NCPI-1A
    LINKDEPTH 1
    MAXLINKS 32
    MAXSERVERS 3
    PROCESS $D1AU (ASSOCIATIVE ON)

    SERVER SERVER-NCP
    LINKDEPTH 32
    MAXLINKS 32
    MAXSERVERS 3
    PROCESS $D1C1
    PROCESS $D1C2
    PROCESS $D1C3
    ---------------------------------------------------------------------------------------------------------------------------------------------
    code:
    #include <stdlib.h>
    #include <stdio.h>
    #include <string.h>
    #include <tal.h>
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> nolist
    main()
    {
    short error, error2, pserror, fserror,countread;
    char *pmon;
    char buffer [200]={0};
    char *sname;

    pmon ="$D1MN";
    sname = "SERVER-NCP";
    strcpy(buffer,"STATUS PROCESS P1A^BICUNI1");

    error = SERVERCLASS_SEND_ (pmon,
    (short)strlen(pmon), /* pathmon */
    sname,
    (short)strlen(sname), /* server class */
    buffer,
    (short)strlen(buffer),
    200,
    &countread,
    -1); /* timeout = forever */
    if (error != 0)
    {
    error2 = SERVERCLASS_SEND_INFO_ (&pserror, &fserror); printf("\nSERVERCLASS_SEND_INFO error = %d \nSERVERCLASS_SEND_ error = %d, pathsend error = %d, fs error = %d\n",error2, error, pserror, fserror);
    printf("\nBuffer size = %d\n", strlen(buffer));

    int i;
    for(i=0; i<strlen(buffer); i++)
    {
    printf("%c",buffer[i]);
    }
    printf("\n\n\n");
    exit (1);
    }
    else
    {
    buffer [countread] = 0;
    printf ("\nReply = %s\n", buffer);
    }
    }
    I see the original server was setup with 'Asoociative On' It's possible the open table in the server can't accept another open.

    Can't explain the error 21.
    I would try changing PMON and SNAME from pointers to arrays and see if it doesn't help with the error 21.

    char pmon[] = "$D1MN";
    char sname[] = "SERVER-NCP";

    Dave
    Hi,

    Keith, I don't find anything in the manuals, that would show me what to send to the server.

    I did not post the complete output to make this thread readable as possible. The SERVERCLASS_SEND_INFO returns 0(OK) and I tried different data types, also arrays instead of pointers. The result is the same. I'm almost sure that I need to send
    command to the SERVER-NCP server instead the SERVER-NCPI-1A.

    Currently I'm using arrays:

    char pmon[5]={0};
    char buffer [200]={0};
    char sname[20]={0};

    strcpy(pmon,"$D1MN");
    strcpy(sname,"SERVER-NCP");
    strcpy(buffer,"STATUS PROCESS P1A^BICUNI1");

    error = SERVERCLASS_SEND_ (pmon,
    (short)strlen(pmon), /* pathmon */
    sname,
    (short)strlen(sname), /* server class */
    buffer,
    (short)strlen(buffer),
    200,
    &countread,
    -1); /* timeout = forever */
    OUTPUT:
    SERVERCLASS_SEND_INFO error = 0
    SERVERCLASS_SEND_ error = 233, pathsend error = 904, fs error = 21 Buffer size = 26
    STATUS PROCESS P1A^BICUNI1


    EMS messages:

    21-06-02;10:03:23.101 \PERUN.$D1MN TANDEM.PATHWAY.L01 3116
    \PERUN.$D1MN: ERROR - *3116* LINKMON L\PERUN.$ZP01,
    ERROR DURING SERVER I/O (21) - SERVER SERVER-NCP

    21-06-02;10:03:23.102 \PERUN.$D1SUD TANDEM.VHS.L01 6
    DEV1VHS:
    02JUN21,10:03 $D1MN: ERROR - *3116* LINKMON L\PERUN.$ZP01, ERROR
    DURING SERVER I/O (21) - SERVER SERVER-NCP. Display text received
    from process $D1MN. Program file \PERUN.$SYSTEM.SYSTEM.PATHMON.
    Primary log file \PERUN.$DATA01.DEV1VHS.LOG0000.

    I'm losing ideas what else to try.

    Uros
    I just notice another EMS error in collector $0

    21-06-02;11:39:59.662 \PERUN.$ZL01 TANDEM.APPCLSTR.L01 1038
    WARNING 1038 - Server \PERUN.$D1MN.SERVER-NCP file
    operation ACS_FS_PSWRITEREAD_() failed, process
    \PERUN.$D1C1:115841149, file \PERUN.$D1C1, error 21

    Uros
    Hi Uros,

    Do you have any indication that the Pathway server you are trying to use is intended for a user such as yourself to access directly using SERVERCLASS_SEND_ ? You mentioned that you found a TAL program that sends commands to SERVER-NCP. Where did you
    find that example program? Perhaps if I looked at that TAL program, it would help me understand what you could be doing wrong.

    I have a feeling that you are trying to do something that a user such as you is not intended to do, and that whatever task you are trying to do needs to be approached in some other way. That is only my feeling, based on very little evidence, so don't
    give up on this program based only on my feeling, because my feeling could be wrong. As I said earlier, I know nothing about xpnet.

    At this point, I would try putting together a trivial program in C/TAL that does a FILE_OPEN_, WRITEREADX, FILE_CLOSE_ to the process and see what error you actually get instead of trying to work through LINKMON. At least you have exact control with that
    and can see whether the FILE_OPEN_ fails, or whether the WRITEREADX is having a problem with your buffer.

    Something you need to be aware of in your program, however. Your statement:

    strcpy(pmon,"$D1MN");

    is going to overrun your buffer and hit the next variable in memory. You only declared the buffer as char[5] and the copy is moving 6 bytes.

    Cheers,
    Randall

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From uros kusar@21:1/5 to All on Thu Jun 3 06:04:13 2021
    sreda, 02. junij 2021 ob 21:03:41 UTC+2 je oseba JShepherd napisala:
    In article <09b4463e-7df3-4a59...@googlegroups.com>,
    uros....@gmail.com says...

    sreda, 02. junij 2021 ob 10:54:14 UTC+2 je oseba uros kusar napisala:
    torek, 01. junij 2021 ob 14:10:00 UTC+2 je oseba Dave Bossi napisala:
    On Monday, May 31, 2021 at 3:59:31 PM UTC-4, Bill Honaker wrote:=20
    On Mon, 31 May 2021 04:07:05 -0700 (PDT), uros kusar <uros....@gmail.= >com> wrote:=20
    =20
    petek, 28. maj 2021 ob 22:22:59 UTC+2 je oseba rkd...@gmail.com napi= >sala:=20
    On Friday, May 28, 2021 at 12:49:03 PM UTC-7, Bill Honaker wrote:= >=20
    On Fri, 28 May 2021 00:06:17 -0700 (PDT), uros kusar <uros....@g= >mail.com> wrote:=20
    =20
    Hi,=20
    I'm writing C program that would get the status of the xpnet ob= >jects (stations,processes,node...). I'm using procedures described in the H= >P manuals(Pathsend and Server programming Manual, C/C++ programmer's Guide.= >..) but I can't get anyting from Pathway except errors. Can you tell me wha= >t am I doing wrong?=20
    =20
    This is the code that I'm working on:=20
    ---------------------------------------------------------------= >-------------------------------------------------=20
    include <stdlib.h>=20
    #include <stdio.h>=20
    #include <string.h>=20
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)>=
    nolist=20
    #include <tal.h>=20
    =20
    main()=20
    {=20
    short error, error2,pserror, fserror,countread;=20
    char *pmon;=20
    char *buffer;=20
    char *sname;=20
    =20
    pmon =3D"$D1MN";=20
    sname =3D "SERVER-NCPI-1A";=20
    buffer =3D"STATUS PROCESS P1A^BICUNI1";=20
    =20
    error =3D SERVERCLASS_SEND_ (pmon,=20
    (short) strlen(pmon), /* pathmon */=20
    sname,=20
    (short) strlen(sname), /* server class */=20
    buffer,=20
    (short) strlen(buffer),=20
    200,=20
    &countread,=20
    -1); /* timeout =3D forever */=20
    =20
    if (error !=3D 0)=20
    {=20
    error2 =3D SERVERCLASS_SEND_INFO_ (&pserror, &fserror);=20
    printf ("\nSERVERCLASS_SEND_ error =3D %d, pathsend error =3D = >%d, fs error =3D %d\n", error, pserror, fserror);=20
    exit (1);=20
    }=20
    else=20
    {=20
    buffer [countread] =3D 0;=20
    printf ("\nReply =3D %s\n", buffer);=20
    }=20
    }=20
    ---------------------------------------------------------------= >-------------------------------------------------=20
    Response:=20
    SERVERCLASS_SEND_ error =3D 233, pathsend error =3D 904, fs err= >or =3D 12=20
    =20
    Best Regards,=20
    Uros=20
    Uros,=20
    =20
    Keith and Randall gave very valuable responses.=20
    =20
    Also one other possibility is that, in creating the link, the PA= >THMON tried to start a server process.=20
    If that server process has a fixed PROCESS NAME for each isntanc= >e, and if there is already a running process with that name,=20
    the attempt to start the process would get an error 12. Look at = >the info ("PATHCOM $D1MN;INFO SERVER-NCPI-1A") and=20
    check what is in the "PROCESS". If it's present, there will eith= >er be one process name, or a list in paraentheses.=20
    From a TACL prompt, issue a status command for each process in t= >he list.=20
    =20
    Bill=20
    Bill,=20
    =20
    Very good remembering that filesystem error 12 is used for attempt= >ing to start a process with a name that already exists. I should have remem= >bered that myself. Unless Pathway's link management also uses filesystem er= >ror 12 for other problems, I'd say a duplicate process name is likely to be=
    the explanation for this problem. Perhaps Uros has set up a test environme=
    nt by duplicating the configuration of an existing environment and did not = >know to change the configured fixed server process names.=20
    Hi,=20
    =20
    Thank you all for your help.=20
    =20
    I changed the code:=20
    1) I added SERVERCLASS_SEND_INFO output error number to see if comma= >nd was succsesfully processed.=20
    2) I changed the buffer to a 200-byte array.=20
    3) I find some tal example of a similar program and I noticed that t= >his tal program, sends the command to a different pathway server. I send it=
    to the SERVER-NCPI-1A server, which is a server for P1A^NODE. But the tal =
    program sends the command to the server SERVER-NCP, which sees all "node" s= >ervers.=20
    =20
    It is interesting because if I send a command to SERVER-NCP I get a = >different error code.=20
    SERVER-NCP:=20
    SERVERCLASS_SEND_ error =3D 233, pathsend error =3D 904, fs error = >=3D 21=20
    =20
    SERVER-NCP-1A:=20
    SERVERCLASS_SEND_ error =3D 233, pathsend error =3D 904, fs error = >=3D 12=20
    =20
    I think that the correct server is a SERVER-NCP.=20
    =20
    --------------------------------------------------------------------= >-------------------------------------------------------------------------= >=20
    Pahway server configuration:=20
    MAXLINKMONS 20 [CURRENTLY 2]=20
    =20
    SERVER SERVER-NCPI-1A=20
    LINKDEPTH 1=20
    MAXLINKS 32=20
    MAXSERVERS 3=20
    PROCESS $D1AU (ASSOCIATIVE ON)=20
    =20
    SERVER SERVER-NCP=20
    LINKDEPTH 32=20
    MAXLINKS 32=20
    MAXSERVERS 3=20
    PROCESS $D1C1=20
    PROCESS $D1C2=20
    PROCESS $D1C3=20
    --------------------------------------------------------------------= >-------------------------------------------------------------------------= >=20
    code:=20
    #include <stdlib.h>=20
    #include <stdio.h>=20
    #include <string.h>=20
    #include <tal.h>=20
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> noli= >st=20
    main()=20
    {=20
    short error, error2, pserror, fserror,countread;=20
    char *pmon;=20
    char buffer [200]=3D{0};=20
    char *sname;=20
    =20
    pmon =3D"$D1MN";=20
    sname =3D "SERVER-NCP";=20
    strcpy(buffer,"STATUS PROCESS P1A^BICUNI1");=20
    =20
    error =3D SERVERCLASS_SEND_ (pmon,=20
    (short)strlen(pmon), /* pathmon */=20
    sname,=20
    (short)strlen(sname), /* server class */=20
    buffer,=20
    (short)strlen(buffer),=20
    200,=20
    &countread,=20
    -1); /* timeout =3D forever */=20
    if (error !=3D 0)=20
    {=20
    error2 =3D SERVERCLASS_SEND_INFO_ (&pserror, &fserror);=20
    printf("\nSERVERCLASS_SEND_INFO error =3D %d \nSERVERCLASS_SEND_ er= >ror =3D %d, pathsend error =3D %d, fs error =3D %d\n",error2, error, pserro= >r, fserror);=20
    printf("\nBuffer size =3D %d\n", strlen(buffer));=20
    =20
    int i;=20
    for(i=3D0; i<strlen(buffer); i++)=20
    {=20
    printf("%c",buffer[i]);=20
    }=20
    printf("\n\n\n");=20
    exit (1);=20
    }=20
    else=20
    {=20
    buffer [countread] =3D 0;=20
    printf ("\nReply =3D %s\n", buffer);=20
    }=20
    }=20
    I see the original server was setup with 'Asoociative On' It's possib= >le the open table in the server can't accept another open.=20
    =20
    Can't explain the error 21.=20
    I would try changing PMON and SNAME from pointers to arrays and see if = >it doesn't help with the error 21.=20

    char pmon[] =3D "$D1MN";
    char sname[] =3D "SERVER-NCP";=20
    =20
    Dave
    Hi,=20
    =20
    Keith, I don't find anything in the manuals, that would show me what to s= >end to the server.=20
    =20
    I did not post the complete output to make this thread readable as possib= >le. The SERVERCLASS_SEND_INFO returns 0(OK) and I tried different data type= >s, also arrays instead of pointers. The result is the same. I'm almost sure=
    that I need to send command to the SERVER-NCP server instead the SERVER-NC=
    PI-1A.=20
    =20
    Currently I'm using arrays:=20
    =20
    char pmon[5]=3D{0};
    char buffer [200]=3D{0};
    char sname[20]=3D{0};=20
    =20
    strcpy(pmon,"$D1MN");=20
    strcpy(sname,"SERVER-NCP");
    strcpy(buffer,"STATUS PROCESS P1A^BICUNI1");=20
    =20
    error =3D SERVERCLASS_SEND_ (pmon,=20
    (short)strlen(pmon), /* pathmon */=20
    sname,=20
    (short)strlen(sname), /* server class */=20
    buffer,=20
    (short)strlen(buffer),=20
    200,=20
    &countread,=20
    -1); /* timeout =3D forever */
    OUTPUT:=20
    SERVERCLASS_SEND_INFO error =3D 0
    SERVERCLASS_SEND_ error =3D 233, pathsend error =3D 904, fs error =3D 21 >> Buffer size =3D 26=20
    STATUS PROCESS P1A^BICUNI1=20
    =20
    =20
    EMS messages:=20
    =20
    21-06-02;10:03:23.101 \PERUN.$D1MN TANDEM.PATHWAY.L01 3116=20
    \PERUN.$D1MN: ERROR - *3116* LINKMON L\PERUN.$ZP01,=20
    ERROR DURING SERVER I/O (21) - SERVER SERVER-NCP=20
    =20
    21-06-02;10:03:23.102 \PERUN.$D1SUD TANDEM.VHS.L01 6=20
    DEV1VHS:=20
    02JUN21,10:03 $D1MN: ERROR - *3116* LINKMON L\PERUN.$ZP01, ERROR=20
    DURING SERVER I/O (21) - SERVER SERVER-NCP. Display text received=20
    from process $D1MN. Program file \PERUN.$SYSTEM.SYSTEM.PATHMON.=20
    Primary log file \PERUN.$DATA01.DEV1VHS.LOG0000.=20
    =20
    I'm losing ideas what else to try.=20
    =20
    Uros

    I just notice another EMS error in collector $0

    21-06-02;11:39:59.662 \PERUN.$ZL01 TANDEM.APPCLSTR.L01 1038
    WARNING 1038 - Server \PERUN.$D1MN.SERVER-NCP file
    operation ACS_FS_PSWRITEREAD_() failed, process
    \PERUN.$D1C1:115841149, file \PERUN.$D1C1, error 21

    Uros
    Are you sure that server accepts a command line text buffer as input ?
    Maybe it requires a structured message.



    =status SERVER-NCPI-1A
    SERVER-NCPI-1A 1

    PROCESS STATE ERROR INFO #LINKS WEIGHT
    $S1AU RUNNING 1 3

    wake /highpin off/ $s1au
    WRITE error 21 on $S1AU

    wake /highpin off/ $s1au send STATUS
    WRITE error 21 on $S1AU


    Hi,

    I'm still trying to understand why my code doesn't work. I think that something is wrong with the structures.

    This tal program was written by my coworker.

    ?symbols !NCPSTASTAT
    ?inspect !NCPSTASTAT
    !NCPSTASTAT
    ?nolist, source $system.system.extdecs0( !NCPSTASTAT
    ? close, !NCPSTASTAT
    ? initializer, !NCPSTASTAT
    ? myterm, !NCPSTASTAT
    ? numout, !NCPSTASTAT
    ? open, !NCPSTASTAT
    ? time, !NCPSTASTAT
    ? serverclass_send_, !NCPSTASTAT
    ? serverclass_send_info_, !NCPSTASTAT
    ? shiftstring, !NCPSTASTAT
    ? write ) !NCPSTASTAT
    !NCPSTASTAT
    ?nolist, source $data02.aciutils.sysmsgs( !NCPSTASTAT
    ? ci^startup ) !NCPSTASTAT
    !NCPSTASTAT
    ?nolist, source $data02.ba60src.bancptal( !NCPSTASTAT
    ? attributes, !NCPSTASTAT
    ? constants, !NCPSTASTAT
    ? defs, !NCPSTASTAT
    ? ncp^lex^struct, !NCPSTASTAT
    ? errors^and^warnings, !NCPSTASTAT
    ? requests, !NCPSTASTAT
    ? responses, !NCPSTASTAT
    ? structs, !NCPSTASTAT
    ? token ) !NCPSTASTAT
    !NCPSTASTAT
    !NCPSTASTAT
    ! globals !!NCPSTASTAT
    string .pmon^nam^g[0:14] := [$occurs( pmon^nam^g ) * [" "]], !NCPSTASTAT
    .sta^nam^g[0:15] := [$occurs( sta^nam^g ) * [" "]]; !NCPSTASTAT
    !NCPSTASTAT
    !NCPSTASTAT
    proc startupproc( rucb, passthru, !NCPSTASTAT
    startupbuf, startup^len, !NCPSTASTAT
    match ) variable; !NCPSTASTAT
    int .rucb, !NCPSTASTAT
    .passthru, !NCPSTASTAT
    .startupbuf, !NCPSTASTAT
    startup^len, !NCPSTASTAT
    match; !NCPSTASTAT
    !NCPSTASTAT
    begin !NCPSTASTAT
    !NCPSTASTAT
    int .startups( ci^startup ) := @startupbuf; !NCPSTASTAT
    !NCPSTASTAT
    string .start^list[0:23] := [$occurs( start^list ) * [" "]], !NCPSTASTAT
    .sptr, !NCPSTASTAT
    .eptr; !NCPSTASTAT
    !NCPSTASTAT
    !NCPSTASTAT
    ! !!NCPSTASTAT
    ! Get argument parameters !!NCPSTASTAT
    ! !!NCPSTASTAT
    if not startups.parm then !NCPSTASTAT
    begin !NCPSTASTAT
    ! no arguments provided !!NCPSTASTAT
    end !NCPSTASTAT
    else !NCPSTASTAT
    begin !NCPSTASTAT
    ! arguments provided, parse them !!NCPSTASTAT
    start^list ':=' startups.parm for 12 words; !NCPSTASTAT
    ! all uppercase !!NCPSTASTAT
    call shiftstring( start^list, $occurs( start^list ), 0 ); !NCPSTASTAT
    !NCPSTASTAT
    scan start^list until " " -> @sptr; !NCPSTASTAT
    if not $carry then !NCPSTASTAT
    begin !NCPSTASTAT
    pmon^nam^g ':=' start^list for ( @sptr - @start^list ); !NCPSTASTAT
    !NCPSTASTAT
    scan sptr[1] until %h00 -> @eptr; !NCPSTASTAT
    sta^nam^g ':=' sptr[1] for ( @eptr - @sptr[1] ); !NCPSTASTAT
    end; !NCPSTASTAT
    end; !NCPSTASTAT
    !NCPSTASTAT
    end; !NCPSTASTAT
    !NCPSTASTAT
    proc ncp^sta^stat main; !NCPSTASTAT
    begin !NCPSTASTAT
    !NCPSTASTAT
    struct .ncp^rqst( ncp^lex^struct^def ); !NCPSTASTAT
    !NCPSTASTAT
    int .cnt^read := 0, !NCPSTASTAT
    err := 0, !NCPSTASTAT
    file^err := 0, !NCPSTASTAT
    term^num := -1, !NCPSTASTAT
    .ncp^resp( ncp^resp^struct^def ), !NCPSTASTAT
    .ncp^resp^tkn( var^token^def ), !NCPSTASTAT
    .ncp^resp^stat( ncp^resp^status^sta^def ), !NCPSTASTAT
    .tim^array[0:6], !NCPSTASTAT
    .term^name[0:11], !NCPSTASTAT
    .buff[0:39]; !NCPSTASTAT
    !NCPSTASTAT
    string .srv^class[0:14] := ["SERVER-NCP "], !NCPSTASTAT
    .cur^state[0:8], !NCPSTASTAT
    .log^state[0:8], !NCPSTASTAT
    .q^cnt[0:4], !NCPSTASTAT
    .err^s[0:4], !NCPSTASTAT
    .file^err^s[0:4]; !NCPSTASTAT
    !NCPSTASTAT
    !NCPSTASTAT
    call initializer( ! rucb ! , !NCPSTASTAT
    !passthru ! , !NCPSTASTAT
    startupproc , !NCPSTASTAT
    !paramproc ! , !NCPSTASTAT
    !assignproc ! , !NCPSTASTAT
    !flags! ); !NCPSTASTAT
    !NCPSTASTAT
    call myterm( term^name ); !NCPSTASTAT
    ! open hometerm !!NCPSTASTAT
    call open( term^name, term^num ); !NCPSTASTAT
    if <> then !NCPSTASTAT
    begin !NCPSTASTAT
    return; !NCPSTASTAT
    end; !NCPSTASTAT
    !NCPSTASTAT
    ! check if startup arguments were provided !!NCPSTASTAT
    if pmon^nam^g = " " or !NCPSTASTAT
    sta^nam^g = " " then !NCPSTASTAT
    begin !NCPSTASTAT
    buff ':=' "Provide PATHWAY PPD and STATION NAME arguments!"; !NCPSTASTAT
    call write( term^num, buff, 47 ); !NCPSTASTAT
    !NCPSTASTAT
    call close( term^num ); !NCPSTASTAT
    return; !NCPSTASTAT
    end; !NCPSTASTAT
    !NCPSTASTAT
    ncp^rqst.static.cmd := ncp^cmd^status; ! STATUS command !!NCPSTASTAT
    ncp^rqst.static.obj^typ := ncp^obj^process; ! for STATIONS !!NCPSTASTAT
    ncp^rqst.static.obj ':=' sta^nam^g for $occurs( sta^nam^g ); !NCPSTASTAT
    ncp^rqst.static.rn ':=' [" "] & !NCPSTASTAT
    ncp^rqst.static.rn for !NCPSTASTAT
    $len( ncp^rqst.static.rn ) - 1; !NCPSTASTAT
    !NCPSTASTAT
    ncp^rqst.static.end^user^id.user ':=' ! USERNAME !!NCPSTASTAT
    [" "] & !NCPSTASTAT
    ncp^rqst.static.end^user^id.user for !NCPSTASTAT
    $len( ncp^rqst.static.end^user^id.user ) - 1; !NCPSTASTAT
    ncp^rqst.static.user^info ':=' ! PASSWORD !!NCPSTASTAT
    [" "] & !NCPSTASTAT
    ncp^rqst.static.user^info for !NCPSTASTAT
    $len( ncp^rqst.static.user^info ) - 1; !NCPSTASTAT
    !NCPSTASTAT
    ncp^rqst.static.end^user^id.sess^id ':=' !NCPSTASTAT
    [" "] & !NCPSTASTAT
    ncp^rqst.static.end^user^id.sess^id for !NCPSTASTAT
    $len( ncp^rqst.static.end^user^id.sess^id ) - 1; !NCPSTASTAT
    !NCPSTASTAT
    ncp^rqst.static.cmd^timout := 1000d; !NCPSTASTAT
    !NCPSTASTAT
    call time( tim^array ); !NCPSTASTAT
    ! insert timestamp in NCP request structure !!NCPSTASTAT
    call numout( ncp^rqst.static.tstamp.byte[0], !NCPSTASTAT
    tim^array[0], 10, 2 ); !NCPSTASTAT
    call numout( ncp^rqst.static.tstamp.byte[2], !NCPSTASTAT
    tim^array[1], 10, 2 ); !NCPSTASTAT
    call numout( ncp^rqst.static.tstamp.byte[4], !NCPSTASTAT
    tim^array[2], 10, 2 ); !NCPSTASTAT
    call numout( ncp^rqst.static.tstamp.byte[6], !NCPSTASTAT
    tim^array[3], 10, 2 ); !NCPSTASTAT
    call numout( ncp^rqst.static.tstamp.byte[8], !NCPSTASTAT
    tim^array[4], 10, 2 ); !NCPSTASTAT
    call numout( ncp^rqst.static.tstamp.byte[10], !NCPSTASTAT
    tim^array[5], 10, 2 ); !NCPSTASTAT
    call numout( ncp^rqst.static.tstamp.byte[12], !NCPSTASTAT
    tim^array[6], 10, 2 ); !NCPSTASTAT
    !NCPSTASTAT
    ncp^rqst.static.max^resps := ncp^val^max^resps^fill; !NCPSTASTAT
    ncp^rqst.static.rqst^vsn ':=' ncp^val^version^300; !NCPSTASTAT
    !NCPSTASTAT
    ncp^rqst.static.ctx^info ':=' !NCPSTASTAT
    [" "] & !NCPSTASTAT
    ncp^rqst.static.ctx^info for !NCPSTASTAT
    $len( ncp^rqst.static.ctx^info ) - 1; !NCPSTASTAT
    !NCPSTASTAT
    ncp^rqst.static.resp^typ := ncp^val^resp^err^warn^norm; !NCPSTASTAT
    ncp^rqst.static.rqst^cntl := ncp^val^rqst^err^warn^norm; !NCPSTASTAT
    !NCPSTASTAT
    ncp^rqst.dynamic^var1 ':=' !NCPSTASTAT
    [%h00] & !NCPSTASTAT
    ncp^rqst.dynamic^var1 for !NCPSTASTAT
    $len( ncp^rqst.dynamic^var1 ) - 1; !NCPSTASTAT
    !NCPSTASTAT
    ncp^rqst.dynamic^area^lgth := $len( ncp^rqst.dynamic^area^lgth ); !NCPSTASTAT
    ! calculate NCP request length !!NCPSTASTAT
    ncp^rqst.static.lgth := !NCPSTASTAT
    $len( ncp^rqst.static ) + !NCPSTASTAT
    $len( ncp^rqst.dynamic^area^lgth ) + !NCPSTASTAT
    ncp^rqst.dynamic^area^lgth; !NCPSTASTAT
    !NCPSTASTAT
    ! PATHSEND to SERVER-NCP !!NCPSTASTAT
    err := serverclass_send_( pmon^nam^g, !NCPSTASTAT
    $occurs( pmon^nam^g ), !NCPSTASTAT
    srv^class, !NCPSTASTAT
    $occurs( srv^class ), !NCPSTASTAT
    ncp^rqst, !NCPSTASTAT
    $len( ncp^rqst ), !NCPSTASTAT
    $len( ncp^resp^struct^def ), !NCPSTASTAT
    cnt^read ); !NCPSTASTAT
    !NCPSTASTAT
    if not err then !NCPSTASTAT
    begin !NCPSTASTAT
    @ncp^resp^tkn := @ncp^rqst.dynamic^var1.dynamic^area; !NCPSTASTAT
    @ncp^resp := @ncp^resp^tkn.var^data; !NCPSTASTAT
    if ncp^resp.resp^code <> ncp^err^ok then !NCPSTASTAT
    begin !NCPSTASTAT
    ! server NCP returned error !!NCPSTASTAT
    end !NCPSTASTAT
    else !NCPSTASTAT
    begin !NCPSTASTAT
    if ncp^rqst.static.max^resps >= 1 then !NCPSTASTAT
    begin !NCPSTASTAT
    ! print field info !!NCPSTASTAT
    buff ':=' " CURRENT LOGICAL"; !NCPSTASTAT
    call write( term^num, buff, 36 ); !NCPSTASTAT
    buff ':=' "STATION STATE STATE " & !NCPSTASTAT
    " QUEUE COUNT"; !NCPSTASTAT
    call write( term^num, buff, 50 ); !NCPSTASTAT
    buff ':=' "---------------- ------- -------" & !NCPSTASTAT
    " -----------"; !NCPSTASTAT
    call write( term^num, buff, 50 ); !NCPSTASTAT
    end; !NCPSTASTAT
    !NCPSTASTAT
    ! loop parse response STATION data and show the STATES !!NCPSTASTAT
    use x; x := 0; !NCPSTASTAT
    while x < ncp^rqst.static.max^resps do !NCPSTASTAT
    begin !NCPSTASTAT
    @ncp^resp^stat := @ncp^resp.resp^data[16]; !NCPSTASTAT
    !NCPSTASTAT
    ! check current state !!NCPSTASTAT
    case ncp^resp^stat.current^state of !NCPSTASTAT
    begin !NCPSTASTAT
    ncp^val^abnormal -> cur^state ':=' "ABNORMAL "; !NCPSTASTAT
    ncp^val^started -> cur^state ':=' "STARTED "; !NCPSTASTAT
    ncp^val^starting -> cur^state ':=' "STARTING "; !NCPSTASTAT
    ncp^val^stopped -> cur^state ':=' "STOPPED "; !NCPSTASTAT
    ncp^val^stopping -> cur^state ':=' "STOPPING "; !NCPSTASTAT
    ncp^val^suspended -> cur^state ':=' "SUSPENDED"; !NCPSTASTAT
    otherwise -> cur^state ':=' "UNKNOWN "; !NCPSTASTAT
    end; !NCPSTASTAT
    ! check logical state !!NCPSTASTAT
    case ncp^resp^stat.logical^state of !NCPSTASTAT
    begin !NCPSTASTAT
    ncp^val^abnormal -> log^state ':=' "ABNORMAL "; !NCPSTASTAT
    ncp^val^started -> log^state ':=' "STARTED "; !NCPSTASTAT
    ncp^val^starting -> log^state ':=' "STARTING "; !NCPSTASTAT
    ncp^val^stopped -> log^state ':=' "STOPPED "; !NCPSTASTAT
    ncp^val^stopping -> log^state ':=' "STOPPING "; !NCPSTASTAT

    [continued in next message]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From JShepherd@21:1/5 to All on Thu Jun 3 14:59:16 2021
    In article <74247541-a672-4653-9eae-a3007a8b9b21n@googlegroups.com>, uros.kusar@gmail.com says...

    sreda, 02. junij 2021 ob 21:03:41 UTC+2 je oseba JShepherd napisala:
    In article <09b4463e-7df3-4a59...@googlegroups.com>,
    uros....@gmail.com says...

    sreda, 02. junij 2021 ob 10:54:14 UTC+2 je oseba uros kusar napisala:
    torek, 01. junij 2021 ob 14:10:00 UTC+2 je oseba Dave Bossi napisala:
    On Monday, May 31, 2021 at 3:59:31 PM UTC-4, Bill Honaker wrote:=20
    On Mon, 31 May 2021 04:07:05 -0700 (PDT), uros kusar <uros....@gmail.=
    wrote:=20
    =20
    petek, 28. maj 2021 ob 22:22:59 UTC+2 je oseba rkd...@gmail.com napi=
    sala:=20
    On Friday, May 28, 2021 at 12:49:03 PM UTC-7, Bill Honaker
    wrote:=
    =20
    On Fri, 28 May 2021 00:06:17 -0700 (PDT), uros kusar <uros....@g=
    mail.com> wrote:=20
    =20
    Hi,=20
    I'm writing C program that would get the status of the xpnet ob=
    jects (stations,processes,node...). I'm using procedures described in the H=
    P manuals(Pathsend and Server programming Manual, C/C++ programmer's Guide.=
    ..) but I can't get anyting from Pathway except errors. Can you tell me wha=
    t am I doing wrong?=20
    =20
    This is the code that I'm working on:=20
    ---------------------------------------------------------------=
    -------------------------------------------------=20
    include <stdlib.h>=20
    #include <stdio.h>=20
    #include <string.h>=20
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)>=
    nolist=20
    #include <tal.h>=20
    =20
    main()=20
    {=20
    short error, error2,pserror, fserror,countread;=20
    char *pmon;=20
    char *buffer;=20
    char *sname;=20
    =20
    pmon =3D"$D1MN";=20
    sname =3D "SERVER-NCPI-1A";=20
    buffer =3D"STATUS PROCESS P1A^BICUNI1";=20
    =20
    error =3D SERVERCLASS_SEND_ (pmon,=20
    (short) strlen(pmon), /* pathmon */=20
    sname,=20
    (short) strlen(sname), /* server class */=20
    buffer,=20
    (short) strlen(buffer),=20
    200,=20
    &countread,=20
    -1); /* timeout =3D forever */=20
    =20
    if (error !=3D 0)=20
    {=20
    error2 =3D SERVERCLASS_SEND_INFO_ (&pserror, &fserror);=20
    printf ("\nSERVERCLASS_SEND_ error =3D %d, pathsend error
    =3D =
    %d, fs error =3D %d\n", error, pserror, fserror);=20
    exit (1);=20
    }=20
    else=20
    {=20
    buffer [countread] =3D 0;=20
    printf ("\nReply =3D %s\n", buffer);=20
    }=20
    }=20
    ---------------------------------------------------------------=
    -------------------------------------------------=20
    Response:=20
    SERVERCLASS_SEND_ error =3D 233, pathsend error =3D 904, fs err=
    or =3D 12=20
    =20
    Best Regards,=20
    Uros=20
    Uros,=20
    =20
    Keith and Randall gave very valuable responses.=20
    =20
    Also one other possibility is that, in creating the link, the PA=
    THMON tried to start a server process.=20
    If that server process has a fixed PROCESS NAME for each isntanc=
    e, and if there is already a running process with that name,=20
    the attempt to start the process would get an error 12. Look
    at =
    the info ("PATHCOM $D1MN;INFO SERVER-NCPI-1A") and=20
    check what is in the "PROCESS". If it's present, there will eith=
    er be one process name, or a list in paraentheses.=20
    From a TACL prompt, issue a status command for each process in t=
    he list.=20
    =20
    Bill=20
    Bill,=20
    =20
    Very good remembering that filesystem error 12 is used for attempt=
    ing to start a process with a name that already exists. I should have remem=
    bered that myself. Unless Pathway's link management also uses filesystem er=
    ror 12 for other problems, I'd say a duplicate process name is likely to be=
    the explanation for this problem. Perhaps Uros has set up a test environme=
    nt by duplicating the configuration of an existing environment and did
    not =
    know to change the configured fixed server process names.=20
    Hi,=20
    =20
    Thank you all for your help.=20
    =20
    I changed the code:=20
    1) I added SERVERCLASS_SEND_INFO output error number to see if comma=
    nd was succsesfully processed.=20
    2) I changed the buffer to a 200-byte array.=20
    3) I find some tal example of a similar program and I noticed that t=
    his tal program, sends the command to a different pathway server. I send it=
    to the SERVER-NCPI-1A server, which is a server for P1A^NODE. But the
    tal =
    program sends the command to the server SERVER-NCP, which sees all "node" s=
    ervers.=20
    =20
    It is interesting because if I send a command to SERVER-NCP I get
    a =
    different error code.=20
    SERVER-NCP:=20
    SERVERCLASS_SEND_ error =3D 233, pathsend error =3D 904, fs error
    =
    =3D 21=20
    =20
    SERVER-NCP-1A:=20
    SERVERCLASS_SEND_ error =3D 233, pathsend error =3D 904, fs error
    =
    =3D 12=20
    =20
    I think that the correct server is a SERVER-NCP.=20
    =20
    --------------------------------------------------------------------=

    -------------------------------------------------------------------------=
    =20
    Pahway server configuration:=20
    MAXLINKMONS 20 [CURRENTLY 2]=20
    =20
    SERVER SERVER-NCPI-1A=20
    LINKDEPTH 1=20
    MAXLINKS 32=20
    MAXSERVERS 3=20
    PROCESS $D1AU (ASSOCIATIVE ON)=20
    =20
    SERVER SERVER-NCP=20
    LINKDEPTH 32=20
    MAXLINKS 32=20
    MAXSERVERS 3=20
    PROCESS $D1C1=20
    PROCESS $D1C2=20
    PROCESS $D1C3=20
    --------------------------------------------------------------------=

    -------------------------------------------------------------------------=
    =20
    code:=20
    #include <stdlib.h>=20
    #include <stdio.h>=20
    #include <string.h>=20
    #include <tal.h>=20
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> noli=
    st=20
    main()=20
    {=20
    short error, error2, pserror, fserror,countread;=20
    char *pmon;=20
    char buffer [200]=3D{0};=20
    char *sname;=20
    =20
    pmon =3D"$D1MN";=20
    sname =3D "SERVER-NCP";=20
    strcpy(buffer,"STATUS PROCESS P1A^BICUNI1");=20
    =20
    error =3D SERVERCLASS_SEND_ (pmon,=20
    (short)strlen(pmon), /* pathmon */=20
    sname,=20
    (short)strlen(sname), /* server class */=20
    buffer,=20
    (short)strlen(buffer),=20
    200,=20
    &countread,=20
    -1); /* timeout =3D forever */=20
    if (error !=3D 0)=20
    {=20
    error2 =3D SERVERCLASS_SEND_INFO_ (&pserror, &fserror);=20
    printf("\nSERVERCLASS_SEND_INFO error =3D %d \nSERVERCLASS_SEND_ er=
    ror =3D %d, pathsend error =3D %d, fs error =3D %d\n",error2, error, pserro=
    r, fserror);=20
    printf("\nBuffer size =3D %d\n", strlen(buffer));=20
    =20
    int i;=20
    for(i=3D0; i<strlen(buffer); i++)=20
    {=20
    printf("%c",buffer[i]);=20
    }=20
    printf("\n\n\n");=20
    exit (1);=20
    }=20
    else=20
    {=20
    buffer [countread] =3D 0;=20
    printf ("\nReply =3D %s\n", buffer);=20
    }=20
    }=20
    I see the original server was setup with 'Asoociative On' It's possib=
    le the open table in the server can't accept another open.=20
    =20
    Can't explain the error 21.=20
    I would try changing PMON and SNAME from pointers to arrays and see
    if =
    it doesn't help with the error 21.=20

    char pmon[] =3D "$D1MN";
    char sname[] =3D "SERVER-NCP";=20
    =20
    Dave
    Hi,=20
    =20
    Keith, I don't find anything in the manuals, that would show me what to s=
    end to the server.=20
    =20
    I did not post the complete output to make this thread readable as possib=
    le. The SERVERCLASS_SEND_INFO returns 0(OK) and I tried different data type=
    s, also arrays instead of pointers. The result is the same. I'm almost sure=
    that I need to send command to the SERVER-NCP server instead the SERVER-NC=
    PI-1A.=20
    =20
    Currently I'm using arrays:=20
    =20
    char pmon[5]=3D{0};
    char buffer [200]=3D{0};
    char sname[20]=3D{0};=20
    =20
    strcpy(pmon,"$D1MN");=20
    strcpy(sname,"SERVER-NCP");
    strcpy(buffer,"STATUS PROCESS P1A^BICUNI1");=20
    =20
    error =3D SERVERCLASS_SEND_ (pmon,=20
    (short)strlen(pmon), /* pathmon */=20
    sname,=20
    (short)strlen(sname), /* server class */=20
    buffer,=20
    (short)strlen(buffer),=20
    200,=20
    &countread,=20
    -1); /* timeout =3D forever */
    OUTPUT:=20
    SERVERCLASS_SEND_INFO error =3D 0
    SERVERCLASS_SEND_ error =3D 233, pathsend error =3D 904, fs error =3D
    21
    Buffer size =3D 26=20
    STATUS PROCESS P1A^BICUNI1=20
    =20
    =20
    EMS messages:=20
    =20
    21-06-02;10:03:23.101 \PERUN.$D1MN TANDEM.PATHWAY.L01 3116=20
    \PERUN.$D1MN: ERROR - *3116* LINKMON L\PERUN.$ZP01,=20
    ERROR DURING SERVER I/O (21) - SERVER SERVER-NCP=20
    =20
    21-06-02;10:03:23.102 \PERUN.$D1SUD TANDEM.VHS.L01 6=20
    DEV1VHS:=20
    02JUN21,10:03 $D1MN: ERROR - *3116* LINKMON L\PERUN.$ZP01, ERROR=20
    DURING SERVER I/O (21) - SERVER SERVER-NCP. Display text received=20
    from process $D1MN. Program file \PERUN.$SYSTEM.SYSTEM.PATHMON.=20
    Primary log file \PERUN.$DATA01.DEV1VHS.LOG0000.=20
    =20
    I'm losing ideas what else to try.=20
    =20
    Uros

    I just notice another EMS error in collector $0

    21-06-02;11:39:59.662 \PERUN.$ZL01 TANDEM.APPCLSTR.L01 1038
    WARNING 1038 - Server \PERUN.$D1MN.SERVER-NCP file
    operation ACS_FS_PSWRITEREAD_() failed, process
    \PERUN.$D1C1:115841149, file \PERUN.$D1C1, error 21

    Uros
    Are you sure that server accepts a command line text buffer as input ?
    Maybe it requires a structured message.



    =status SERVER-NCPI-1A
    SERVER-NCPI-1A 1

    PROCESS STATE ERROR INFO #LINKS WEIGHT
    $S1AU RUNNING 1 3

    wake /highpin off/ $s1au
    WRITE error 21 on $S1AU

    wake /highpin off/ $s1au send STATUS
    WRITE error 21 on $S1AU


    Hi,

    I'm still trying to understand why my code doesn't work. I think that something
    is wrong with the structures.

    This tal program was written by my coworker.

    Uros



    From that code it looks like you have to correctly populate the
    request struct and send it
    struct .ncp^rqst( ncp^lex^struct^def );

    Then handle the potentially multi-item response coming back

    int .ncp^resp( ncp^resp^struct^def ),


    You will need C versions of all those TAL structs or
    do it in TAL

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Keith Dick@21:1/5 to JShepherd on Thu Jun 3 08:51:49 2021
    On Thursday, June 3, 2021 at 7:59:18 AM UTC-7, JShepherd wrote:
    In article <74247541-a672-4653...@googlegroups.com>,
    uros....@gmail.com says...

    sreda, 02. junij 2021 ob 21:03:41 UTC+2 je oseba JShepherd napisala:
    In article <09b4463e-7df3-4a59...@googlegroups.com>,
    uros....@gmail.com says...

    sreda, 02. junij 2021 ob 10:54:14 UTC+2 je oseba uros kusar napisala:
    torek, 01. junij 2021 ob 14:10:00 UTC+2 je oseba Dave Bossi napisala: >> >> > On Monday, May 31, 2021 at 3:59:31 PM UTC-4, Bill Honaker wrote:=20 >> >> > > On Mon, 31 May 2021 04:07:05 -0700 (PDT), uros kusar <uros....@gmail.=
    wrote:=20
    =20
    petek, 28. maj 2021 ob 22:22:59 UTC+2 je oseba rkd...@gmail.com napi=
    sala:=20
    On Friday, May 28, 2021 at 12:49:03 PM UTC-7, Bill Honaker wrote:=
    =20
    On Fri, 28 May 2021 00:06:17 -0700 (PDT), uros kusar <uros....@g=
    mail.com> wrote:=20
    =20
    Hi,=20
    I'm writing C program that would get the status of the xpnet ob=
    jects (stations,processes,node...). I'm using procedures described in the
    H=
    P manuals(Pathsend and Server programming Manual, C/C++ programmer's Guide.=
    ..) but I can't get anyting from Pathway except errors. Can you tell me wha=
    t am I doing wrong?=20
    =20
    This is the code that I'm working on:=20
    ---------------------------------------------------------------=
    -------------------------------------------------=20
    include <stdlib.h>=20
    #include <stdio.h>=20
    #include <string.h>=20
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)>=
    nolist=20
    #include <tal.h>=20
    =20
    main()=20
    {=20
    short error, error2,pserror, fserror,countread;=20
    char *pmon;=20
    char *buffer;=20
    char *sname;=20
    =20
    pmon =3D"$D1MN";=20
    sname =3D "SERVER-NCPI-1A";=20
    buffer =3D"STATUS PROCESS P1A^BICUNI1";=20
    =20
    error =3D SERVERCLASS_SEND_ (pmon,=20
    (short) strlen(pmon), /* pathmon */=20
    sname,=20
    (short) strlen(sname), /* server class */=20
    buffer,=20
    (short) strlen(buffer),=20
    200,=20
    &countread,=20
    -1); /* timeout =3D forever */=20
    =20
    if (error !=3D 0)=20
    {=20
    error2 =3D SERVERCLASS_SEND_INFO_ (&pserror, &fserror);=20 >> >> > > >> > > printf ("\nSERVERCLASS_SEND_ error =3D %d, pathsend error =3D =
    %d, fs error =3D %d\n", error, pserror, fserror);=20
    exit (1);=20
    }=20
    else=20
    {=20
    buffer [countread] =3D 0;=20
    printf ("\nReply =3D %s\n", buffer);=20
    }=20
    }=20
    ---------------------------------------------------------------=
    -------------------------------------------------=20
    Response:=20
    SERVERCLASS_SEND_ error =3D 233, pathsend error =3D 904, fs err=
    or =3D 12=20
    =20
    Best Regards,=20
    Uros=20
    Uros,=20
    =20
    Keith and Randall gave very valuable responses.=20
    =20
    Also one other possibility is that, in creating the link, the PA=
    THMON tried to start a server process.=20
    If that server process has a fixed PROCESS NAME for each isntanc=
    e, and if there is already a running process with that name,=20
    the attempt to start the process would get an error 12. Look at =
    the info ("PATHCOM $D1MN;INFO SERVER-NCPI-1A") and=20
    check what is in the "PROCESS". If it's present, there will eith=
    er be one process name, or a list in paraentheses.=20
    From a TACL prompt, issue a status command for each process in
    t=
    he list.=20
    =20
    Bill=20
    Bill,=20
    =20
    Very good remembering that filesystem error 12 is used for attempt=
    ing to start a process with a name that already exists. I should have remem=
    bered that myself. Unless Pathway's link management also uses filesystem er=
    ror 12 for other problems, I'd say a duplicate process name is likely to be=
    the explanation for this problem. Perhaps Uros has set up a test environme=
    nt by duplicating the configuration of an existing environment and did not =
    know to change the configured fixed server process names.=20
    Hi,=20
    =20
    Thank you all for your help.=20
    =20
    I changed the code:=20
    1) I added SERVERCLASS_SEND_INFO output error number to see if comma=
    nd was succsesfully processed.=20
    2) I changed the buffer to a 200-byte array.=20
    3) I find some tal example of a similar program and I noticed that
    t=
    his tal program, sends the command to a different pathway server. I send it=
    to the SERVER-NCPI-1A server, which is a server for P1A^NODE. But the tal =
    program sends the command to the server SERVER-NCP, which sees all "node"
    s=
    ervers.=20
    =20
    It is interesting because if I send a command to SERVER-NCP I get a =
    different error code.=20
    SERVER-NCP:=20
    SERVERCLASS_SEND_ error =3D 233, pathsend error =3D 904, fs error =
    =3D 21=20
    =20
    SERVER-NCP-1A:=20
    SERVERCLASS_SEND_ error =3D 233, pathsend error =3D 904, fs error =
    =3D 12=20
    =20
    I think that the correct server is a SERVER-NCP.=20
    =20
    --------------------------------------------------------------------=
    -------------------------------------------------------------------------= >> >=20
    Pahway server configuration:=20
    MAXLINKMONS 20 [CURRENTLY 2]=20
    =20
    SERVER SERVER-NCPI-1A=20
    LINKDEPTH 1=20
    MAXLINKS 32=20
    MAXSERVERS 3=20
    PROCESS $D1AU (ASSOCIATIVE ON)=20
    =20
    SERVER SERVER-NCP=20
    LINKDEPTH 32=20
    MAXLINKS 32=20
    MAXSERVERS 3=20
    PROCESS $D1C1=20
    PROCESS $D1C2=20
    PROCESS $D1C3=20
    --------------------------------------------------------------------=
    -------------------------------------------------------------------------= >> >=20
    code:=20
    #include <stdlib.h>=20
    #include <stdio.h>=20
    #include <string.h>=20
    #include <tal.h>=20
    #include <cextdecs (SERVERCLASS_SEND_, SERVERCLASS_SEND_INFO_)> noli=
    st=20
    main()=20
    {=20
    short error, error2, pserror, fserror,countread;=20
    char *pmon;=20
    char buffer [200]=3D{0};=20
    char *sname;=20
    =20
    pmon =3D"$D1MN";=20
    sname =3D "SERVER-NCP";=20
    strcpy(buffer,"STATUS PROCESS P1A^BICUNI1");=20
    =20
    error =3D SERVERCLASS_SEND_ (pmon,=20
    (short)strlen(pmon), /* pathmon */=20
    sname,=20
    (short)strlen(sname), /* server class */=20
    buffer,=20
    (short)strlen(buffer),=20
    200,=20
    &countread,=20
    -1); /* timeout =3D forever */=20
    if (error !=3D 0)=20
    {=20
    error2 =3D SERVERCLASS_SEND_INFO_ (&pserror, &fserror);=20
    printf("\nSERVERCLASS_SEND_INFO error =3D %d \nSERVERCLASS_SEND_ er=
    ror =3D %d, pathsend error =3D %d, fs error =3D %d\n",error2, error, pserro=
    r, fserror);=20
    printf("\nBuffer size =3D %d\n", strlen(buffer));=20
    =20
    int i;=20
    for(i=3D0; i<strlen(buffer); i++)=20
    {=20
    printf("%c",buffer[i]);=20
    }=20
    printf("\n\n\n");=20
    exit (1);=20
    }=20
    else=20
    {=20
    buffer [countread] =3D 0;=20
    printf ("\nReply =3D %s\n", buffer);=20
    }=20
    }=20
    I see the original server was setup with 'Asoociative On' It's possib=
    le the open table in the server can't accept another open.=20
    =20
    Can't explain the error 21.=20
    I would try changing PMON and SNAME from pointers to arrays and see if =
    it doesn't help with the error 21.=20

    char pmon[] =3D "$D1MN";
    char sname[] =3D "SERVER-NCP";=20
    =20
    Dave
    Hi,=20
    =20
    Keith, I don't find anything in the manuals, that would show me what to
    s=
    end to the server.=20
    =20
    I did not post the complete output to make this thread readable as possib=
    le. The SERVERCLASS_SEND_INFO returns 0(OK) and I tried different data type=
    s, also arrays instead of pointers. The result is the same. I'm almost sure=
    that I need to send command to the SERVER-NCP server instead the SERVER-NC=
    PI-1A.=20
    =20
    Currently I'm using arrays:=20
    =20
    char pmon[5]=3D{0};
    char buffer [200]=3D{0};
    char sname[20]=3D{0};=20
    =20
    strcpy(pmon,"$D1MN");=20
    strcpy(sname,"SERVER-NCP");
    strcpy(buffer,"STATUS PROCESS P1A^BICUNI1");=20
    =20
    error =3D SERVERCLASS_SEND_ (pmon,=20
    (short)strlen(pmon), /* pathmon */=20
    sname,=20
    (short)strlen(sname), /* server class */=20
    buffer,=20
    (short)strlen(buffer),=20
    200,=20
    &countread,=20
    -1); /* timeout =3D forever */
    OUTPUT:=20
    SERVERCLASS_SEND_INFO error =3D 0
    SERVERCLASS_SEND_ error =3D 233, pathsend error =3D 904, fs error =3D 21
    Buffer size =3D 26=20
    STATUS PROCESS P1A^BICUNI1=20
    =20
    =20
    EMS messages:=20
    =20
    21-06-02;10:03:23.101 \PERUN.$D1MN TANDEM.PATHWAY.L01 3116=20
    \PERUN.$D1MN: ERROR - *3116* LINKMON L\PERUN.$ZP01,=20
    ERROR DURING SERVER I/O (21) - SERVER SERVER-NCP=20
    =20
    21-06-02;10:03:23.102 \PERUN.$D1SUD TANDEM.VHS.L01 6=20
    DEV1VHS:=20
    02JUN21,10:03 $D1MN: ERROR - *3116* LINKMON L\PERUN.$ZP01, ERROR=20
    DURING SERVER I/O (21) - SERVER SERVER-NCP. Display text received=20 >> >> from process $D1MN. Program file \PERUN.$SYSTEM.SYSTEM.PATHMON.=20
    Primary log file \PERUN.$DATA01.DEV1VHS.LOG0000.=20
    =20
    I'm losing ideas what else to try.=20
    =20
    Uros

    I just notice another EMS error in collector $0

    21-06-02;11:39:59.662 \PERUN.$ZL01 TANDEM.APPCLSTR.L01 1038
    WARNING 1038 - Server \PERUN.$D1MN.SERVER-NCP file
    operation ACS_FS_PSWRITEREAD_() failed, process
    \PERUN.$D1C1:115841149, file \PERUN.$D1C1, error 21

    Uros
    Are you sure that server accepts a command line text buffer as input ?
    Maybe it requires a structured message.



    =status SERVER-NCPI-1A
    SERVER-NCPI-1A 1

    PROCESS STATE ERROR INFO #LINKS WEIGHT
    $S1AU RUNNING 1 3

    wake /highpin off/ $s1au
    WRITE error 21 on $S1AU

    wake /highpin off/ $s1au send STATUS
    WRITE error 21 on $S1AU


    Hi,

    I'm still trying to understand why my code doesn't work. I think that something
    is wrong with the structures.

    This tal program was written by my coworker.

    Uros



    From that code it looks like you have to correctly populate the
    request struct and send it
    struct .ncp^rqst( ncp^lex^struct^def );

    Then handle the potentially multi-item response coming back

    int .ncp^resp( ncp^resp^struct^def ),


    You will need C versions of all those TAL structs or
    do it in TAL

    As JShepherd notes, the TAL code indicates that the request and response messages are not simple text strings, but moderately complex structures. Your coworker had some instructions about how to construct and interpret those structures. If that
    coworker is still around, ask where he or she got the instructions. If he or she is not still around, you might find some documentation in a file in the subvolume $DATA02.ACIUTILS, or in some other location that contains files from ACI. If you are
    lucky, ACI provided some documentation and the structure declarations suitable for writing the program in C. If they supplied only help for TAL programmers, you will have a bit of a difficult time if you don't know TAL.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bill Honaker@21:1/5 to All on Thu Jun 3 12:00:07 2021

    From that code it looks like you have to correctly populate the
    request struct and send it
    struct .ncp^rqst( ncp^lex^struct^def );

    Then handle the potentially multi-item response coming back

    int .ncp^resp( ncp^resp^struct^def ),


    You will need C versions of all those TAL structs or
    do it in TAL

    As JShepherd notes, the TAL code indicates that the request and response messages are not simple text strings, but moderately complex structures. Your coworker had some instructions about how to construct and interpret those structures. If that
    coworker is still around, ask where he or she got the instructions. If he or she is not still around, you might find some documentation in a file in the subvolume $DATA02.ACIUTILS, or in some other location that contains files from ACI. If you are
    lucky, ACI provided some documentation and the structure declarations suitable for writing the program in C. If they supplied only help for TAL programmers, you will have a bit of a difficult time if you don't know TAL.

    That would explain the 'error 21'.

    The server probably uses that error to indicate to the calling program that the message it received isn't correct for the structure (or structures) that it expects to receive.

    The line that starts with "?nolist, source $data02.ba60src.bancptal(" implies that you should find a file called ?nolist, source $data02.ba60src.bancc that contains the
    structures and literals required to build the message in C.

    A very high level skim of the code also says you will need to parse the message and calculate pointers to some returned sub-structures, especially if they occur multiple times.

    Bill

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Randall@21:1/5 to Bill Honaker on Thu Jun 3 11:52:45 2021
    On Thursday, June 3, 2021 at 1:00:09 p.m. UTC-4, Bill Honaker wrote:

    From that code it looks like you have to correctly populate the
    request struct and send it
    struct .ncp^rqst( ncp^lex^struct^def );

    Then handle the potentially multi-item response coming back

    int .ncp^resp( ncp^resp^struct^def ),


    You will need C versions of all those TAL structs or
    do it in TAL

    As JShepherd notes, the TAL code indicates that the request and response messages are not simple text strings, but moderately complex structures. Your coworker had some instructions about how to construct and interpret those structures. If that
    coworker is still around, ask where he or she got the instructions. If he or she is not still around, you might find some documentation in a file in the subvolume $DATA02.ACIUTILS, or in some other location that contains files from ACI. If you are lucky,
    ACI provided some documentation and the structure declarations suitable for writing the program in C. If they supplied only help for TAL programmers, you will have a bit of a difficult time if you don't know TAL.
    That would explain the 'error 21'.

    The server probably uses that error to indicate to the calling program that the message it received isn't correct for the structure (or structures) that it expects to receive.

    The line that starts with "?nolist, source $data02.ba60src.bancptal(" implies that you should find a file called ?nolist, source $data02.ba60src.bancc that contains the
    structures and literals required to build the message in C.

    A very high level skim of the code also says you will need to parse the message and calculate pointers to some returned sub-structures, especially if they occur multiple times.

    Bill

    Bill: I'm not sure what the specific server does, but the general IPC protocol for XPNet, particularly station-to-station messaging, is rather complex with optional fields controlled by bitmaps. I think the C coding error above may be part of the problem,
    though, before anything else happens. I do also think you're correct that the error 21 is coming from the server as a response to an invalid header, probably with a bad length field.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bill Honaker@21:1/5 to Randall on Thu Jun 3 14:43:12 2021
    On Thu, 3 Jun 2021 11:52:45 -0700 (PDT), Randall <rsbecker@nexbridge.com> wrote:

    On Thursday, June 3, 2021 at 1:00:09 p.m. UTC-4, Bill Honaker wrote:

    From that code it looks like you have to correctly populate the
    request struct and send it
    struct .ncp^rqst( ncp^lex^struct^def );

    Then handle the potentially multi-item response coming back

    int .ncp^resp( ncp^resp^struct^def ),


    You will need C versions of all those TAL structs or
    do it in TAL

    As JShepherd notes, the TAL code indicates that the request and response messages are not simple text strings, but moderately complex structures. Your coworker had some instructions about how to construct and interpret those structures. If that
    coworker is still around, ask where he or she got the instructions. If he or she is not still around, you might find some documentation in a file in the subvolume $DATA02.ACIUTILS, or in some other location that contains files from ACI. If you are lucky,
    ACI provided some documentation and the structure declarations suitable for writing the program in C. If they supplied only help for TAL programmers, you will have a bit of a difficult time if you don't know TAL.
    That would explain the 'error 21'.

    The server probably uses that error to indicate to the calling program that the message it received isn't correct for the structure (or structures) that it expects to receive.

    The line that starts with "?nolist, source $data02.ba60src.bancptal(" implies that you should find a file called ?nolist, source $data02.ba60src.bancc that contains the
    structures and literals required to build the message in C.

    A very high level skim of the code also says you will need to parse the message and calculate pointers to some returned sub-structures, especially if they occur multiple times.

    Bill

    Bill: I'm not sure what the specific server does, but the general IPC protocol for XPNet, particularly station-to-station messaging, is rather complex with optional fields controlled by bitmaps. I think the C coding error above may be part of the
    problem, though, before anything else happens. I do also think you're correct that the error 21 is coming from the server as a response to an invalid header, probably with a bad length field.

    For communications with devices, authorization services etc. XPNet uses ISO messages or X9.15 messages, both of which are character strings including bitmpas '
    (1 or 2 for ISO, multi-level of X9.15). Command and Control internal messages use binary structures, often times concatenated based on context (such as number
    of stations returned in a status station * command).

    One should either review it with another staff member already familiar, attend an ACI course, or be prepared to dig deeply into the manuals.
    Bill

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From uros kusar@21:1/5 to All on Fri Jun 4 00:24:13 2021
    četrtek, 03. junij 2021 ob 21:43:14 UTC+2 je oseba Bill Honaker napisala:
    On Thu, 3 Jun 2021 11:52:45 -0700 (PDT), Randall <rsbe...@nexbridge.com> wrote:

    On Thursday, June 3, 2021 at 1:00:09 p.m. UTC-4, Bill Honaker wrote:

    From that code it looks like you have to correctly populate the
    request struct and send it
    struct .ncp^rqst( ncp^lex^struct^def );

    Then handle the potentially multi-item response coming back

    int .ncp^resp( ncp^resp^struct^def ),


    You will need C versions of all those TAL structs or
    do it in TAL

    As JShepherd notes, the TAL code indicates that the request and response messages are not simple text strings, but moderately complex structures. Your coworker had some instructions about how to construct and interpret those structures. If that
    coworker is still around, ask where he or she got the instructions. If he or she is not still around, you might find some documentation in a file in the subvolume $DATA02.ACIUTILS, or in some other location that contains files from ACI. If you are lucky,
    ACI provided some documentation and the structure declarations suitable for writing the program in C. If they supplied only help for TAL programmers, you will have a bit of a difficult time if you don't know TAL.
    That would explain the 'error 21'.

    The server probably uses that error to indicate to the calling program that the message it received isn't correct for the structure (or structures) that it expects to receive.

    The line that starts with "?nolist, source $data02.ba60src.bancptal(" implies that you should find a file called ?nolist, source $data02.ba60src.bancc that contains the
    structures and literals required to build the message in C.

    A very high level skim of the code also says you will need to parse the message and calculate pointers to some returned sub-structures, especially if they occur multiple times.

    Bill

    Bill: I'm not sure what the specific server does, but the general IPC protocol for XPNet, particularly station-to-station messaging, is rather complex with optional fields controlled by bitmaps. I think the C coding error above may be part of the
    problem, though, before anything else happens. I do also think you're correct that the error 21 is coming from the server as a response to an invalid header, probably with a bad length field.
    For communications with devices, authorization services etc. XPNet uses ISO messages or X9.15 messages, both of which are character strings including bitmpas '
    (1 or 2 for ISO, multi-level of X9.15). Command and Control internal messages use binary structures, often times concatenated based on context (such as number
    of stations returned in a status station * command).

    One should either review it with another staff member already familiar, attend an ACI course, or be prepared to dig deeply into the manuals.
    Bill

    Thank you all for your help. I will let you know when I found the request structures or make some progress on the program.

    Regards,
    Uros

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From gcav@21:1/5 to uros kusar on Fri Jun 18 11:56:43 2021
    On Friday, May 28, 2021 at 7:06:19 AM UTC, uros kusar wrote:
    Hi,
    I'm writing C program that would get the status of the xpnet objects (stations,processes,node...). I'm using procedures described in the HP manuals(Pathsend and Server programming Manual, C/C++ programmer's Guide...) but I can't get anyting from
    Pathway except errors. Can you tell me what am I doing wrong?



    AFAIK, to get status of stations,processes,node and all B24 things, you must talk directly to the XPNET process. You have to read the XPNET programmers guide.

    gc

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Gustavo Martinez@21:1/5 to All on Wed Jul 28 13:54:51 2021
    El viernes, 18 de junio de 2021 a la(s) 15:56:44 UTC-3, gcav escribió:
    On Friday, May 28, 2021 at 7:06:19 AM UTC, uros kusar wrote:
    Hi,
    I'm writing C program that would get the status of the xpnet objects (stations,processes,node...). I'm using procedures described in the HP manuals(Pathsend and Server programming Manual, C/C++ programmer's Guide...) but I can't get anyting from
    Pathway except errors. Can you tell me what am I doing wrong?

    AFAIK, to get status of stations,processes,node and all B24 things, you must talk directly to the XPNET process. You have to read the XPNET programmers guide.

    gc

    Hello Uros,

    You can write the "requester" against XPNET in C or TAL, that is not the problem. The correct server to be called is SERVER-NCP and you have to use SERVERCLASS_SEND_ as expected. The SERVER-NCP will determine which NCPI server the command
    needs to be send (if you send a message for only one NODE, then not all the the NCPI servers will be called).Effectively the structures are not so easy. You need to read carefully the manual in order to determine how to format the message and indicate
    to the NCP Server what you want to do. You would need basically three things to keep in mind:

    1) The request contains a static part and a variable part. Being the static part easy and the variable part the complex one. One of the complex issues are how you indicate structures lenght. So I am guessing here that you are not sending correctly those
    structures and the SERVER-NCP respond with Filesystem error 21.

    2) The request structure in C is: ncp_c_lex_struct_def

    3) The variable part depends on the command you want to send to the NCP Server. If it is a DELIVER (for example), then look for the deliver structure, complete carefully that structure, and then "insert" that structure into the variable part of the
    request.
    The request can be as complex as you need. Any command you execute from NCPCOM should (in theory) work programmatically.

    Hope this helps,
    Regards,
    Gustavo.

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