System.out.println("enhanced options");
log.info("enhanced options");
   public final void sendQueryResponse()         throws IOException {      System.out.println("sending query response");      byte abyte0[] = new byte[64];      abyte0[0] = 0;       // Cursor Row/column (set to zero)      abyte0[1] = 0;       //           ""      abyte0[2] = -120;    // X'88' inbound write structure Field aid      if (enhanced == true) {         abyte0[3] = 0;       // 0x003D (61) length of query response         abyte0[4] = 64;      //       ""  see note below ?????????      }      else {         abyte0[3] = 0;       // 0x003A (58) length of query response         abyte0[4] = 58;      //       ""                              //  the length between 58 and 64 seems to cause                              //  different formatting codes to be sent from                              //  the host ???????????????? why ???????                              //    Well the why can be found in the manual if                              //       read a little more ;-)      }      abyte0[5] = -39;     // command class 0xD9      abyte0[6] = 112;     // Command type query 0x70      abyte0[7] = -128;    // 0x80 Flag byte      abyte0[8] = 6;       // Controller Hardware Class      abyte0[9] = 0;       // 0x0600 - Other WSF or another 5250 Emulator      abyte0[10] = 1;      // Controller Code Level      abyte0[11] = 1;      //    Version 1 Rel 1.0      abyte0[12] = 0;      //       ""      abyte0[13] = 0;      // 13 - 28 are reserved so set to 0x00      abyte0[14] = 0;      //       ""      abyte0[15] = 0;      //       ""      abyte0[16] = 0;      //       ""      abyte0[17] = 0;      //       ""      abyte0[18] = 0;      //       ""      abyte0[19] = 0;      //       ""      abyte0[20] = 0;      //       ""      abyte0[21] = 0;      //       ""      abyte0[22] = 0;      //       ""      abyte0[23] = 0;      //       ""      abyte0[24] = 0;      //       ""      abyte0[25] = 0;      //       ""      abyte0[26] = 0;      //       ""      abyte0[27] = 0;      //       ""      abyte0[28] = 0;      //       ""      abyte0[29] = 1;      // Device type - 0x01 5250 Emulator      abyte0[30] = codePage.uni2ebcdic('5');  // Device type character      abyte0[31] = codePage.uni2ebcdic('2');  //          ""      abyte0[32] = codePage.uni2ebcdic('5');  //          ""      abyte0[33] = codePage.uni2ebcdic('1');  //          ""      abyte0[34] = codePage.uni2ebcdic('0');  //          ""      abyte0[35] = codePage.uni2ebcdic('1');  //          ""      abyte0[36] = codePage.uni2ebcdic('1');  //          ""      abyte0[37] = 2;      // Keyboard Id - 0x02 Standard Keyboard      abyte0[38] = 0;      // extended keyboard id      abyte0[39] = 0;      // reserved      abyte0[40] = 0;      // 40 - 43 Display Serial Number      abyte0[41] = 36;     //      abyte0[42] = 36;     //      abyte0[43] = 0;      //      abyte0[44] = 1;      // Maximum number of display fields - 256      abyte0[45] = 0;      // 0x0100      abyte0[46] = 0;      // 46 -48 Reserved set to 0x00      abyte0[47] = 0;      abyte0[48] = 0;      abyte0[49] = 1;      // 49 - 53 Controller Display Capability      abyte0[50] = 16;     //      see rfc - tired of typing :-)      abyte0[51] = 0;      //          ""      abyte0[52] = 0;      //          ""      //  53      //    Bit 0-2: B'000'   -  no graphics capability      //             B'001'   - 5292-2 style graphics      //    Bit 3-7: B '00000' = reserved (it seems for Client access)      if (enhanced == true) {//         abyte0[53] = 0x5E;      //  0x5E turns on ehnhanced mode//         abyte0[53] = 0x27;      //  0x5E turns on ehnhanced mode         abyte0[53] = 0x7;      //  0x5E turns on ehnhanced mode         System.out.println("enhanced options");      }      else         abyte0[53] = 0x0;      //  0x0 is normal emulation      abyte0[54] = 24;      // 54 - 60 Reserved set to 0x00                            //  54 - I found out is used for enhanced user                            //       interface level 3.  Bit 4 allows headers                            //       and footers for windows      abyte0[54] = 8;      // 54 - 60 Reserved set to 0x00                            //  54 - I found out is used for enhanced user                            //       interface level 3.  Bit 4 allows headers                            //       and footers for windows      abyte0[55] = 0;      abyte0[56] = 0;      abyte0[57] = 0;      abyte0[58] = 0;      abyte0[59] = 0;      abyte0[60] = 0;      abyte0[61] = 0;      // gridlines are not supported      abyte0[62] = 0;      // gridlines are not supported      abyte0[63] = 0;      writeGDS(0, 0, abyte0); // now tell them about us      abyte0 = null;   }