ibm midrange - C# Call QRCVDTAQ in AS400 hit Error code 3426 -


below error detail, pls help.

                     additional message information                           message id . . . . . . :   cpiad08       severity . . . . . . . :   40          message type . . . . . :   diagnostic                                           date sent  . . . . . . :   17/07/26      time sent  . . . . . . :   14:30:08     message . . . . :   host server communications error occurred on recv() -          length.                                                                       cause . . . . . :   error code 3426 received while processing recv() -     length function host server communications.                           recovery  . . . :   see listed message(s) determine          cause of error; if necessary, correct error , issue request        again.                                                                                                                                                      bottom  press enter continue.                                                         f3=exit   f6=print   f9=display message details   f12=cancel                    f21=select assistance level                                                                                     display job log                                                                                               system:   ltas02   job . . :   qzhqssrv      user . . :   quser         number . . . :   226264         job 226264/quser/qzhqssrv started on 17/07/24 @ 18:25:13 in subsystem            qusrwrk in qsys. job entered system on 17/07/24 @ 18:25:13.                  user dpsgit client 10.51.180.171 connected server.                      connection remote socket reset socket.                     host server communications error occurred on recv() - length.                   job 226264/quser/qzhqssrv ended user dpsgit.                             target data queue program job ended abnormally.                                 job 226264/quser/qzhqssrv ended on 17/07/26 @ 14:30:44; .006 seconds             used; end code 50 .      

clp test9100cy

        pgm        parm(&dtaq &lib &msgdta &keys)                                dcl        var(&dtaq) type(*char) len(10)                                dcl        var(&lib) type(*char) len(10)                                 dcl        var(&lenq) type(*dec) len(5 0) value(1024)                    dcl        var(&msgdta) type(*char) len(1024)                    /*      dcl        var(&wait) type(*dec) len(5 0) value(5)  */                   dcl        var(&wait) type(*dec) len(5 0) value(-1)                      dcl        var(&order) type(*char) len(2) value('eq')                    dcl        var(&keylen) type(*dec) len(3 0) value(20)                    dcl        var(&keys) type(*char) len(20)                                dcl        var(&sndid) type(*dec) len(3 0) value(0)                      dcl        var(&snd) type(*char) len(10) value(' ')                       call       pgm(qrcvdtaq) parm(&dtaq &lib &lenq &msgdta +                         &wait &order &keylen &keys &sndid &snd) end:                         rclrsc           endpgm                                                   

c# source

using system; using system.collections.generic; using system.linq; using system.text; using cwbx; using system.data.odbc;   namespace as400testconsole { class qrcvdtaq {     static void main(string[] args)     {         string connectionstringodbc = "driver={client access odbc driver   (32-bit)};system=xxxxx;uid=dpsgit;pwd=abcd1234;";         getqueuescwbx(connectionstringodbc);         console.readline();      }      private static void getqueuescwbx(string connectionstring)     {         string result = string.empty;         cwbx.stringconverter stringconverter = new cwbx.stringconverter();         cwbx.packedconverter packedconverter = new cwbx.packedconverter();          //define as400 system , connect         as400system system = new as400system();         system.define("xxxxx");         system.userid = "xxxxx";         system.password = "abcd1234";         system.ipaddress = "10.144.151.205";         system.connect(cwbcoserviceenum.cwbcoservicedataqueues);          //check connection         if (system.isconnected(cwbcoserviceenum.cwbcoservicedataqueues) == 1)         {             //create program object , link system             cwbx.program program = new cwbx.program();             program.libraryname = "xxxxxxxx";             program.programname = "test9100cy";             program.system = system;              cwbx.dataqueue dq = new cwbx.dataqueue();             dq.system = system;             dq.libraryname = "xxxxxxxx";             dq.queuename = "dqkey1";              string dqname = "dqkey1";             string lib = "xxxxxxxx";             string len = "x'01024f'";             string data = "";             string wait = "x'00005f'";              string order = "eq";             string keylen = "20";             string key = "00110736";             string sendlen = "0";             string send = "";               string strsql = "call xxxxxxxx.test9100cy('dqkey1','xxxxxxxx','data','00110736')";               //create collection of parameters associated program             programparameters parameters = new programparameters();             parameters.append("dtaq", cwbrcparametertypeenum.cwbrcinput, 10);             parameters.append("lib", cwbrcparametertypeenum.cwbrcinput, 10);             parameters.append("msgdta", cwbrcparametertypeenum.cwbrcoutput, 1024);                                        parameters.append("keys", cwbrcparametertypeenum.cwbrcinout, 8);              parameters["dtaq"].value = stringconverter.tobytes(dqname.padright(10, ' '));             parameters["lib"].value = stringconverter.tobytes(lib.padright(10, ' '));             packedconverter.digits = 5;             packedconverter.decimalposition = 0;                              packedconverter.digits = 3;             packedconverter.decimalposition = 0;                              parameters["keys"].value = stringconverter.tobytes(key.padright(20, ' '));               //finally call program             try             {                program.call(parameters);                result = stringconverter.frombytes(parameters["msgdta"].value);                console.writeline(result);             }             catch (exception ex)             {                 if (system.errors.count > 0)                 {                     foreach (cwbx.error error in system.errors)                     {                         //console.writeline(error.text);                         result = error.text;                     }                 }                 if (program.errors.count > 0)                 {                     foreach (cwbx.error error in program.errors)                     {                         //console.writeline(error.text);                         result += error.text + "\r\n";                     }                 }                 console.writeline(result);                 console.writeline(ex.message);                 console.writeline(ex.stacktrace);             }         }     }     }      } 


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -