none
Some problems about receive data from host by using Microsoft.HostIntegration.SNA.Session RRS feed

  • Question

  • Hi,
    Excuse me , I'm not good at English.
    It is my codes and problems

                SessionLU0 sessionLU0;
                SessionLU0Data sendData;
                SessionLU0Data receiveData;

                sessionLU0 = new SessionLU0();
                sessionLU0.Connect("LUTEST", SessionLU0InitType.SSCP);

                sendData = new SessionLU0Data();
                sendData.Data = mydata;
                sessionLU0.Send(sendData);

                receiveData = sessionLU0.Receive(1000, true);
                Console.WriteLine("SessionLU0ReceiveIndication is " + receiveData.Indication);
                Console.WriteLine("Data length is " + receiveData.Data.Length);
                //The first of receive
                //SessionLU0ReceiveIndication is 41041
                //Data length is 0

                receiveData = sessionLU0.Receive(1000, true);
                Console.WriteLine("SessionLU0ReceiveIndication is " + receiveData.Indication);
                Console.WriteLine("Data length is " + receiveData.Data.Length);
                //The second of receive
                //SessionLU0ReceiveIndication is 57448
                //Data length is 1996

                //Because the host total reponse data length is more than 1996, I call the Receive method again to receive more data
                receiveData = sessionLU0.Receive(1000, true);
                //but this time I get a SessionTimeout Exception.

    My problem is
    1. What is it mean that SessionLU0ReceiveIndication is 41041 and  57448?
    2. How can I get more data from the session? send some response ?
    3. I can't send no more data from this LU after I used the LU with my code, must reactive the PU.

    I think that must send some response to the host for get more data, but I don't know what to send.
    Thank you.


    • Edited by Nowe Wednesday, March 23, 2011 2:24 AM
    Tuesday, March 22, 2011 8:45 AM

Answers

  • Sorry for the delay in responding. I would suggest that you open a support case with the HIS support team so that we can troubleshoot this issue. It appears that this may be a problem with Session Integrator, but we would need to do some deeper investigation to verify.

    If you aren't familair with opening a Microsoft Support case, you can go to http://support.microsoft.com/select/Default.aspx?target=assistance, enter Host Intergration Server in the "Quick product finder" field, choose the correct version, and then step through the wizard.

    Thanks...

     


    Stephen Jackson - MSFT
    Wednesday, April 13, 2011 5:08 PM

All replies

  • If you go into the defintion for SessionLU0ReceiveIndication in your project, you should see the following:

        public enum SessionLU0ReceiveIndication
        {
            ExpeditedData = -2147483648,
            NoResponse = 0,
            ExceptionResponse1 = 1,
            ExceptionResponse2 = 2,
            DefiniteResponse1 = 4,
            DefiniteResponse2 = 8,
            EndBracket = 16,
            BeginBracket = 32,
            DataComplete = 64,
            DataIncomplete = 128,
            Cancel = 256,
            Chase = 512,
            Quiesce = 1024,
            Shutdown = 2048,
            Release = 4096,
            ApplicationData = 8192,
            FunctionManagementData = 16384,
            LogicalUnitData = 32768,
            SSCPData = 65536,
            NegativeResponse = 131072,
            PositiveResponse = 262144,
            ExceptionRequest = 524288,
            SessionStarted = 1048576,
            Send = 2097152,
            Unbind = 4194304,
            Clear = 8388608,
            NormalData = 1073741824,
        }

    The returned values for SessionLU0ReceiveIndication are bit-wise AND-able to reflect multiple SNA indicators that can be returned. The values above are the indicators.

    For example, the value of 41041 in binary is as follows:

    1010000001010001

    Therefore, the following indicators are set:

    ExceptionResponse1
    EndBracket
    DataComplete
    ApplicationData
    LogicalUnitData

    You need to have an understanding of the underlying SNA data flow here in order to know what the session state is so that you can see what action to take next. It is hard to give more details without knowing what has data has been sent and received.

    Hope this helps a little.

    Thanks...

     


    Stephen Jackson - MSFT
    • Marked as answer by Nowe Wednesday, March 23, 2011 2:26 AM
    • Unmarked as answer by Nowe Thursday, March 24, 2011 8:57 AM
    Tuesday, March 22, 2011 8:46 PM
  • Hi, Jackson
    Thank you very much, I will try it.

    Wednesday, March 23, 2011 2:23 AM
  • You say that you know that the hosts total response data length is more than 1996...HOW do you know this? The fact that the second receive is timing out sorta indicates that there is nothing more from the host...or that you need to prod it or something! :-)

    57448 -> Logical Unit Data | Function Management Data | Application Data | Data Complete | Begin Bracket | Definite Response 2 (If my trusting calculator is right)

    The Data Complete assuredly means you need to do something.

    Rob (writer of the samples for this bit of the product - have you looked at the Woodgrove Bank, ATM sample?)

    Thursday, March 24, 2011 5:14 AM
    Moderator
  • Hi. Rob:
    I know the total response data from host, because I know the transaction data format, and by the trace log, the session integrator server had sent the reponse, but I just see the trace log in FMI, not in DLC!

    My trace log

    DLC   --------------------------------------------------------------------------------
    DLC   04160000->01020101 DLCST RSRC
    DLC                      Credit:4
    DLC  
    DLC   ---- Header at address 01A04620, 0 elements ----
    DLC   04000004 00002C00 01080000 0100840C     <......,.......d.>
    DLC   --------------------------------------------------------------------------------
    DLC   04160000->01020101 DLC DATA    
    DLC                      DAF:08 OAF:01 ODAI:off Normal
    DLC                      RQD FMD EC DR2 PI
    DLC  
    DLC   ---- Header at address 01A04620, 1 elements ----
    DLC   0100AEBC 00002C00 08010002 0100840C     <......,.......d.>
    DLC  
    DLC   ---- Element at address 023F1000, start 10, end 13 ----
    DLC   012100C7                                <.!.G            >
    FMI   --------------------------------------------------------------------------------
    FMI   01020D02->061D8003 FMI DATA 
    FMI                      ACK reqd Key:3 Seq:2 ECI COMMIT CEI BBIUI
    FMI                      EBIUI
    FMI  
    FMI   ---- Header at address 01A04620, 1 elements ----
    FMI   01000003 300E2C00 08010002 0100840C     <....0.,.......d.>
    FMI  
    FMI   ---- Element at address 023F1000, start 4, end 13 ----
    FMI   2C000801 00020121 00C7                  <,......!.G      >
    FMI   --------------------------------------------------------------------------------
    FMI   061D8003->01020D02 FMIST RSRC
    FMI                      Credit:1
    FMI  
    FMI   ---- Header at address 01A04620, 0 elements ----
    FMI   04000001 00000000 00000000 0100440A     <..............D.>
    FMI   --------------------------------------------------------------------------------
    FMI   061D8003->01020D02 FMIST ACKLUA
    FMI                      Msg key:0 Sequence:2
    FMI  
    FMI   ---- Header at address 01A04620, 1 elements ----
    FMI   01050000 00000000 00000002 0100440A     <..............D.>
    FMI  
    FMI   ---- Element at address 023F1000, start 4, end 12 ----
    FMI   2C000108 00018B21 00                    <,......!.       >

    no more trace log

    after recvice the data 0xC7, I find the data "2C000108 00018B21 00" reponse from FMI but the data didn't find in DLC, and the LU can't send any data via DLC to host.
    why?


    Thursday, March 24, 2011 8:57 AM
  • Do you have a trace that captures everything from the connection attempt?

     


    Stephen Jackson - MSFT
    Thursday, March 24, 2011 1:40 PM
  • Hi, Jackson:
    I just enable the SnaServer from the list of trace items, is any more important trace items I must enable? I will try to enable all of the trace items.

    Thanks for all your help.

    Friday, March 25, 2011 4:02 AM
  • The DR2 indicator on the Second Receive means that you will need to send a Response. The first Receive indicated Exception Response, i.e. only need to send a Response if you feel like it (in order to indicate an error), but Definite Response means you definitely need to respond :-). Try doing:

    sessionLU0.SendResponse(0);

    Rob

    Friday, March 25, 2011 5:16 AM
    Moderator
  • Hi Rob,

    by this trace

    DLC   --------------------------------------------------------------------------------
    DLC   04160000->01020101 DLCST RSRC
    DLC                      Credit:4
    DLC  
    DLC   ---- Header at address 01A04620, 0 elements ----
    DLC   04000004 00002C00 01080000 0100840C     <......,.......d.>
    DLC   --------------------------------------------------------------------------------
    DLC   04160000->01020101 DLC DATA    
    DLC                      DAF:08 OAF:01 ODAI:off Normal
    DLC                      RQD FMD EC DR2 PI
    DLC  
    DLC   ---- Header at address 01A04620, 1 elements ----
    DLC   0100AEBC 00002C00 08010002 0100840C     <......,.......d.>
    DLC  
    DLC   ---- Element at address 023F1000, start 10, end 13 ----
    DLC   012100C7                                <.!.G            >
    FMI   --------------------------------------------------------------------------------
    FMI   01020D02->061D8003 FMI DATA 
    FMI                      ACK reqd Key:3 Seq:2 ECI COMMIT CEI BBIUI
    FMI                      EBIUI
    FMI  
    FMI   ---- Header at address 01A04620, 1 elements ----
    FMI   01000003 300E2C00 08010002 0100840C     <....0.,.......d.>
    FMI  
    FMI   ---- Element at address 023F1000, start 4, end 13 ----
    FMI   2C000801 00020121 00C7                  <,......!.G      >
    FMI   --------------------------------------------------------------------------------
    FMI   061D8003->01020D02 FMIST RSRC
    FMI                      Credit:1
    FMI  
    FMI   ---- Header at address 01A04620, 0 elements ----
    FMI   04000001 00000000 00000000 0100440A     <..............D.>
    FMI   --------------------------------------------------------------------------------
    FMI   061D8003->01020D02 FMIST ACKLUA
    FMI                      Msg key:0 Sequence:2
    FMI  
    FMI   ---- Header at address 01A04620, 1 elements ----
    FMI   01050000 00000000 00000002 0100440A     <..............D.>
    FMI  
    FMI   ---- Element at address 023F1000, start 4, end 12 ----
    FMI   2C000108 00018B21 00                    <,......!.       >

    in the last line, I call method "sessionLU0.SendResponse(0);" The FMI Send ACKLUA with data 8B2100, but this data is not Correct reponse, the correct reponse is 838000, how to send this data by method SendResponse, I try each vaule of SessionLU0SendIndication but not work.
    Thank you.


    Friday, March 25, 2011 9:12 AM
  • Nowe
     
    Unfortunately I know nothing whatsoever at all about the programming facilities you are using and I am quite lost in the trace you are using - BUT - I do know one or two things about SNA.
     
    *If* the request header to which the response header is
     
    1000 1011 0010 0001 0000 0000 (8B2100)
     
    is
     
    0000 10x1 0x10 0x01 xxx0 xxx0
     
    where x can be 0 or 1
     
    then it is a valid response. I would expect that the programming environment would be able to handle getting its SNA protocols correct.
     
    The point is that a positive response has to match the definite response bits, either DR1, DR2 or both DR1 and DR2. This positive response has the DR2 bit on and only the DR2 bit.
     
    What you propose as the correct response is the following
     
    1000 0011 1000 0000 0000 0000 (838000)
     
    This specifies the DR1 bit rather than the DR2 bit. The other respects in which it differs from the response you don't like is that it does not have the "formatted" (FI) bit and it does not have the "pacing" (PI) bit.
     
    Pacing is interesting. In my rather limited experience pacing is usually regarded as a function to be handled by supporting logic, for example VTAM, and not be a matter with which the programmer should need to bother. The supporting logic should request pacing responses and return pacing responses while maintaining either the adaptive or fixed pacing algorithms. The necessary bits or "stand-alone" responses should be imposed on the request and response headers or sent independently.
     
    Perhaps you or one of the regular responders can point out the URL of a document which explains the environment and what the trace is supposed to be showing so that people with my background can participate without wasting time having to guess.
     
    Another source of information on the data flow which may be easier to follow than the trace you are showing above is - assuming your LU0 (my second assumption) partner is supported by VTAM in z/OS or z/VSE (or even z/VM) - NetView Session Monitor traces which are so much easier to set up and follow than any other trace facility I have ever seen. You could even post the display images of the trace data.
     
    Chris Mason
    Friday, March 25, 2011 2:44 PM
  • I'm curious as to why you think the proper response has to be X'838000'.

    I ask because since the incoming RU sets DR2 (Definite Response 2) in the Request Header, the Response Header for the acknowledgement must have the same Definite Response bits set. Therefore, the response must also have the DR2 indicator set.

    X'8B2100' has the DR2I bit set to 1 which would appear to be correct per SNA protocol.

    The folowing is from the SNA Formats (GA27-3136) in Chapter 5 (Request/Response Headers):

    A request that asks for an exception response or a definite response has one or both of the DR1I and DR2I bits set to 1 (three combinations); a response to a request returns the same (DR1I, DR2I) bit combination (see Figure 5-2 on page 5-8).

    In the incoming RU from teh mainfame, the RH is X'012100'. Byte 2 contains the DR1I, DR2I, ERI bits and they are 0,1,0, respectively. Therefore, the response must set the DR1I and DR2I bits the same for the response and this is what Session Integrator is doing.

    As far as the tracing question, you can anable the follow before running your application:

    SnaServer: Data Link Control messages
                     3270 Messages

    Session Integrator Client: 3270 Messages
                                          LUA API

    Thanks...

     

     


    Stephen Jackson - MSFT
    Friday, March 25, 2011 2:48 PM
  • Hi, Mason:
    Yes, you are right, I don't want it have the  "formatted" (FI) bit, I use the Session Integrator for LU0 in HIS 2009 with .NET Framework. The Session Integrator will control the acknowledgment to SNA, but my case the acknowledgment is not corrcet, I must control it by myself.

    here is the trace by use WinSLI API to reponset the DR2

    DLC   --------------------------------------------------------------------------------
    DLC   04160000->01020101 DLCST RSRC
    DLC                      Credit:4
    DLC  
    DLC   ---- Header at address 018A4654, 0 elements ----
    DLC   04000004 00012C00 01060000 0100B808     <......,.........>
    DLC   --------------------------------------------------------------------------------
    DLC   04160000->01020101 DLC DATA    
    DLC                      DAF:06 OAF:01 ODAI:off Normal
    DLC                      RQD FMD EC DR2 PI
    DLC  
    DLC   ---- Header at address 018A4654, 1 elements ----
    DLC   01000F10 00012C00 06010002 0100B808     <......,.........>
    DLC  
    DLC   ---- Element at address 02292240, start 10, end 13 ----
    DLC   012100C7                                <.!.G            >
    FMI   --------------------------------------------------------------------------------
    FMI   01020C02->0C1D0001 FMI DATA 
    FMI                      ACK reqd Key:3 Seq:2 ECI COMMIT CEI BBIUI
    FMI                      EBIUI
    FMI  
    FMI   ---- Header at address 018A4654, 1 elements ----
    FMI   01000003 300E2C00 06010002 0100B808     <....0.,.........>
    FMI  
    FMI   ---- Element at address 02292240, start 4, end 13 ----
    FMI   2C000601 00020121 00C7                  <,......!.G      >
    FMI   --------------------------------------------------------------------------------
    FMI   0C1D0001->01020C02 FMIST RSRC
    FMI                      Credit:1
    FMI  
    FMI   ---- Header at address 018A4654, 0 elements ----
    FMI   04000001 300E2C00 06010002 0100800B     <....0.,.........>
    FMI   --------------------------------------------------------------------------------
    FMI   0C1D0001->01020C02 FMIST ACKLUA
    FMI                      Msg key:0 Sequence:2
    FMI  
    FMI   ---- Header at address 018A4584, 1 elements ----
    FMI   01050000 01000100 401F0002 0100800B     <........@.......>
    FMI  
    FMI   ---- Element at address 02292FF0, start 4, end 12 ----
    FMI   2C000000 00028380 00                    <,.....c..       >
    DLC   --------------------------------------------------------------------------------
    DLC   01020101->04160000 DLC DATA    
    DLC                      DAF:01 OAF:06 ODAI:off Normal
    DLC                      +RSP FMD BC EC DR2 PI
    DLC  
    DLC   ---- Header at address 018A4418, 1 elements ----
    DLC   04000000 00002C00 01060002 0100800B     <......,.........>
    DLC  
    DLC   ---- Element at address 0229012C, start 10, end 12 ----
    DLC   832100                                  <c!.             >

    The FI bit is off, and DLC sent the response.

    Thank you very much.

    Monday, March 28, 2011 3:54 AM
  • Hi, Jackson:

    I think that if the FI bit is 1, the DLC layer wait for the FM header, so there are not any trace logs in DLC.

    I will try how to send a response with FI bit be 0 by use Session Integrator.

    Thank you very much.

    Monday, March 28, 2011 5:05 AM
  • Sorry for the delay in responding. I would suggest that you open a support case with the HIS support team so that we can troubleshoot this issue. It appears that this may be a problem with Session Integrator, but we would need to do some deeper investigation to verify.

    If you aren't familair with opening a Microsoft Support case, you can go to http://support.microsoft.com/select/Default.aspx?target=assistance, enter Host Intergration Server in the "Quick product finder" field, choose the correct version, and then step through the wizard.

    Thanks...

     


    Stephen Jackson - MSFT
    Wednesday, April 13, 2011 5:08 PM