HP 3000 Manuals

TRAN3270 [ SNA IMF Programmer's Reference Manual ] MPE/iX 5.0 Documentation


SNA IMF Programmer's Reference Manual

TRAN3270 

TRAN3270emulates pressing one of the transmit keys (listed below) on a
3278 display station (LU.T2) or a 3287 printer (LU.T1).

Syntax 
_____________________________________________________________________
|                                                                   |
|                      I      I      I            I         I       |
|        TRAN3270 (terminalid, aid, cursorrow, cursorcolumn, result)|
_____________________________________________________________________

            

Parameters 

terminalid (input) 

Integer identifying the terminal.  The terminalid is returned in a call
to the OPEN3270 intrinsic.

aid (input) 

Integer specifying the Attention Identifier (AID)that will be sent to the
host.  Values are provided for LU.T2 terminals and LU.T1 printers.  LU.T3
printers do not transmit keys or data to the host.  Two LU.T1 printer
keys, ENABLE and HOLD, cannot be used unless bit 12 of the OPEN3270 flags 
parameter is set to 1.  The value -1 can be specified aid values are as
follows:

       Terminal keys (LU.T2 values) 

-1 = Inhibit AID and cursor position transmission
    (transparent mode only)
-3 = Send a positive response, if one has not already been sent
    (transparent mode only) 

-2 = ATTN             55 = PF7              67 = PF15             46 = PF23 
39 = ENTER            56 = PF8              68 = PF16             60 = PF24 
49 = PF1              57 = PF9              69 = PF17             37 = PA1 
50 = PF2              58 = PF10             70 = PF18             62 = PA2 
51 = PF3              35 = PF11             71 = PF19             44 = PA3 
52 = PF4              64 = PF12             72 = PF20             95 = CLEAR 
53 = PF5              65 = PF13             73 = PF21             48 = SYS REQ 
54 = PF6              66 = PF14             91 = PF22 

       Printer keys (LU.T1 values)  

     -10 = HOLD 
     -11 = PA1 
     -12 = PA2 
     -13 = CANCEL 
     -14 = ENABLE 

cursorrow (input) 

Integer specifying the row where the cursor is located (for LU.T2):

0 through 11 (480-character screen)
0 through 23 (1920-character screen)
0 through 42 (3440-character screen)

Specify a value of -1 for transparent mode.  This value does not send a
cursor address.  cursorcolumn must also be set to -1 to prevent sending
the cursor address. 

cursorcolumn (input) 

Integer indicating the column where the cursor is located (for LU.T2):

0 through 39 (480-character screen)
0 through 79 (1920-character screen)
0 through 79 (3440-character screen)

Specify a value of -1 for transparent mode.  This value does not send a
cursor address.  cursorrow must also be set to -1 to prevent sending the
cursor address.

result (output) 

The following values can be generated by the TRAN3270 intrinsic:

       0 = Successful completion.
       1 = Device not open.
       9 = Host modified screen since last receive
           request.  (MPE V only) 
      14 = Attempt made to update a field or transmit
           from an LU.T3 printer.
      15 = Invalid AID parameter was sent.
      16 = Invalid cursor address was specified.
      17 = Attempt made to write to a field where
           input is inhibited.
      22 = BASIC calling sequence error has occurred.
      24 = Response timeout has occurred.
      25 = Intrinsic call made while in split stack
            mode.
      26 = Intrinsic call made with the parameter value
           out of bounds.
      29 = Called intrinsic with a request already
           outstanding. (No-wait I/O only) 
      30 = Internal error occurred in IMF intrinsic.
      43 = Transparent mode not requested for LU.T1
           emulation.
      51 = Called TRAN3270 without calling WRITESTREAM
           first.
      80 = Your session is in receive state and cannot
           send data.
      82 = Your screen is in 'unowned' state so it cannot
           send data.
     301 = Illegal DB register.
     302 = Invalid session.
     305 = Parameter bounds violation.
     308 = Session is inactive.
     310 = Bad PI in RH.
     311 = Bad BCI in RH.
     312 = Bad ECI in RH.
     313 = Bad EDI in RH.
     314 = Reserved bits in RH must be set to zero.
     315 = Internal error.
     316 = Invalid RU size.
     317 = NAU is inactive.
     319 = LU-SSCP message pending.
     323 = Negative LU-SSCP response.
     325 = Request pending.
     330 = Illegal call.
     332 = Privilege mode required.
     336 = Link shutdown occurred.
     337 = Protocol shutdown requested.
     338 = Quiesce shutdown requested.
     340 = No stack space.
     351 = Link failure occurred.
     352 = Transport internal error shutdown.
     353 = Hierarchical shutdown.
     400 = Expedited response pending.
     401 = Data traffic inactive.
     402 = SDT request not received.
     403 = Invalid session control protocol.
     404 = RQR request pending.
     405 = STSN request not pending.
     407 = Unsupported CRV request/response.
     408 = Unsupported session control request.

Description 

Using the TRAN3270 intrinsic is equivalent to pressing one of the 3278
terminal or 3287 printer keys, which causes changed screen data to be
sent to the host when it polls the devices.  TRAN3270 emulates these
keys:

   *   ENTER key 

   *   Program Function keys (PF1 through PF24) 

   *   Program Attention keys (PA1, PA2, PA3) 

   *   HOLD PRINT key 

   *   ENABLE PRINT key 

   *   CANCEL key 

   *   CLEAR key 

   *   SYS REQ key 

The TRAN3270 also allows you to specify a cursor address along with the
AID to be sent to the host.

If the TRAN3270 intrinsic executes successfully, or if it returns a
result code of 14, 16, or 30, it automatically disables the keyboard,
preventing your program from calling any intrinsics that write to the
internal screen image. 

After calling the TRAN3270 intrinsic, the RECV3270 intrinsic is usually
the first SNA IMF intrinsic you call.  Normally, the host reenables the
keyboard when it sends data in response to your transmission.  If you are
not expecting the host to respond to your transmission, or if the
TRAN3270 intrinsic fails with result code 14, 16, or 30, you can reenable
input by calling the RESET3270 intrinsic. 

For SNA IMF/V, if the host modifies your internal screen image just
before or just after you call TRAN3270, new host data might arrive before
the TRAN3270 intrinsic completes execution.  You will receive a result
code 9, indicating that the host has modified your internal screen image,
and your data will not be sent.  Your program must then call the RECV3270
intrinsic, which will complete immediately.

In transparent mode, SNA IMF delays sending a positive response to a host
transmission until your program calls either RECV3270 or TRAN3270.  If
your program has no data to send or receive, you can call TRAN3270 with
an aid value of -3 to send a positive response to the host. 

In transparent mode, you can inhibit sending the AID key or the cursor
address as follows: 

   *   To inhibit transmission of both the AID key and the cursor
       address, set aid to -1.  The cursorrow and cursorcolumn parameters
       are not used.

   *   To allow transmission of the AID key and inhibit transmission of
       the cursor address, set aid to a legitimate value and set both
       cursorrow and cursorcolumn to -1.

During LU.T2 sessions in transparent mode, if you are not suppressing the
cursor, and if you are sending a CLEAR or PA key, call WRITESTREAM with
the  outbuflen parameter set to 0 before calling TRAN3270.

In transparent mode, SNA IMF will not check the AID key to determine
whether it is a CLEAR or PA key.

When you specify the CLEAR key,the internal screen image is cleared
(filled with null characters) before the CLEAR AID is sent to the host.
When you send the CLEAR and PA keys in non-transparent mode, only the AID
is sent to the host; no data is sent. 

Call the TRAN3270 intrinsic in transparent or non-transparent mode.

COBOL Calling Sequence 

CALL "CTRAN3270" USING TERMINALID AID CURSORROW CURSORCOLUMN RESULT. (on
MPE V and in compatibility mode on MPE XL)

CALL INTRINSIC "TRAN3270" USING TERMINALID AID CURSORROW CURSORCOLUMN
RESULT. (in native mode on MPE XL)

All parameters are numeric data items.

FORTRAN Calling Sequence 

CALL TRAN3270 (TERMINALID, AID, CURSORROW, CURSORCOLUMN, RESULT)

All parameters are integer variables.

BASIC Calling Sequence 

CALL BTRAN3270 (T, A9, R9, C9, R) (on MPE V and in compatibility mode on
MPE XL)

CALL TRAN3270 (T, A9, R9, C9, R) (in native mode on MPE XL)

All parameters are integer variables.

SPL Calling Sequence 

TRAN3270 (TERMINALID, AID, CURSORROW, CURSORCOLUMN, RESULT)

All parameters are integer variables.

Pascal Calling Sequence 

TRAN3270 (TERMINALID, AID, CURSORROW, CURSORCOLUMN, RESULT);

All parameters are short integer variables.

C/XL Calling Sequence 

TRAN3270 (&TERMINALID, &AID, &CURSORROW, &CURSORCOLUMN, &RESULT);

All parameters are of type short.

Pascal Program Excerpts 

Following are excerpts from a Pascal program that calls SNA IMF
intrinsics.  For examples of complete Pascal programs in non-transparent
and transparent modes, see appendix F, "Sample Programs."

     {************************** Global Declarations **************************}

     type
        shortint      = -32768..32767;       { global type, two bytes (half word) }
     .
     .
     .
     var
        terminalid    : shortint;            { value returned by OPEN3270 intrinsic }
        result        : shortint;
        cursorrow     : shortint;
        cursorcolumn  : shortint;
     .
     .
     .
     procedure TRAN3270;  intrinsic;
     .
     .
     .

     {************************** Local Declarations **************************}

     var
        aid    : shortint;      { All other TRAN3270 variables (terminalid, }
                                { result, cursorrow, and cursorcolum) }
                                { are declared as global. }
     .
     .
     .

     {************** Variable Initialization and Intrinsic Call **************}

     aid := 48;                 { Assume that cursorrow and }
                                { cursorcolumn are set outside of this }
                                { local procedure. }

     TRAN3270 (terminalid, aid, cursorrow, cursorcolumn, result);



MPE/iX 5.0 Documentation