Click to open or copy the files for the Rui3270 sample.
For more information, see LUA Code Samples in the SDK in the LUA Programmer's Guide.
This sample program is a simple 3270 emulator. It uses the RUI API to access both the SSCP and LU sessions. Outbound data from the host is displayed on the screen unformatted. Both SSCP and LU data are shown.
If the outbound data is an RQD request, an automatic positive response is sent. Inbound data can be entered at the keyboard and is sent on the current session. This current session can be toggled between the SSCP and LU sessions by pressing the [ key (the left square-bracket key), followed by <cr> (carriage return), although it switches automatically on receipt of BIND or UNBIND.
The program is invoked with a single parameter - the name of the LUA LU to use. This is converted to upper case and must match an LUA LU in the configuration file. This LU should be configured for a 327? on the host.
This program works with TSO, provided that complex formatted logon screens are not used.
There is a Snaenv.bat file to set environment variables, available via the SNA Samples topic.
This sample uses the following keywords:
_fstrlen; acssvc_c; closedown; createwindow; csv_init; definemuxsemlist; defwindowproc; dispatchmessage; do_write; endpaint; exit; getch; getdc; getfmireturncode; getlasterror; getmessage; getstockobject; getsystemmetrics; issue_init; issue_read; issue_rpq; issue_rsp; issue_verb; kbhit; loadcursor; loadicon; memcpy; memset; other_done; postquitmessage; printf; read_done; registerclass; registerwindowmessage; releasedc; rui; showwindow; textout; translatemessage; updatewindow; wait_active_status; waitforsingleobject; winmain; winrui; winruicleanup; winruigetlastinitstatus; wndproc