fhg
Volume 8, Number 23 -- June 11, 2008

Keeping 5250 Alive

Published: June 11, 2008

by Tom Van Looy

Some time ago, we had problems with Client Access sessions being reset. It seemed that these connections were traveling over a VPN that got disconnected after being idle for a while. Because we were not in charge of the VPN, I used TCP keepalive as a workaround for this problem.

Keepalive

A TCP connection can set the SO_KEEPALIVE option with the setsockopts() system call. When the TCP connection is idle for a specified period of time, a keepalive packet will be sent to keep the connection open. (In practice, this keepalive packet is a request for acknowledgement of the previous packet.) Most programming languages provide a library routine to activate the keepalive option. For example, Java provides the setKeepAlive() method, which can be invoked after socket construction.

There are three parameters that can be configured for keepalive messages. On a Windows machine, these are registry values in HKLM\SYSTEM\CurrentControlSet\Services\TcpIp\Parameters. KeepAliveInterval (default 1 second), KeepAliveTime (default 2 hours) and TcpMaxDataRetransmission (default 5 seconds). On a Linux machine these are sysctl values in net.ipv4 (or procfs in /proc/sys/net/ipv4), tcp_keepalive_intvl (default 75s), tcp_keepalive_time (default 2h), and tcp_keepalive_probes (default 9).

TCP keepalive messages are described in RFC1122. The RFC also points out some disadvantages of sending keepalive messages.

5250 Keepalive

It is possible to activate keepalive messages on the 5250 emulator. The startup file for a System i connection (.WS file) must be edited with a text editor. These files reside by default in C:\Program Files\IBM\Client Access\Emulator\Private. Below the [Telnet5250] option you add the option KeepAlive=Y. This is enough to activate keepalive messages on a 5250 session.

The IBM Client Access suite delivers a command line tool, CWBCOPWR, that can configure some of the keepalive parameters. For example, to set KeepAliveTime to 10 seconds and KeepAliveInterval to 1 second, use the command "cwbcopwr/MKA:1,10".


Tom Van Looy started out his IT career as an ILE/RPG developer in 2005 and moved over to the position of i5/OS system engineer in 2007. He is currently employed by Lisis nv in Belgium. Although a Unix enthusiast, he also has great affinity with GNU/Linux and *BSD. Tom can be reached by email at tom@ctors.net.




                     Post this story to del.icio.us
               Post this story to Digg
    Post this story to Slashdot


Sponsored By
HELP/SYSTEMS

SEQUEL™ is the leading business intelligence solution for the IBM® System i™.

                      · Executive Dashboards with Gauges for Critical Business Metrics
                      · Graphical Query and Reporting
                      · Drill-Down Data Analysis
                      · Multi-Platform Database Access
                      · Powerful Scripting with CL-like Programming
                      · Secure Web Access

SEQUEL meets all your System i data access and analysis requirements.

Learn more now.


Senior Technical Editor: Ted Holt
Technical Editor: Joe Hertvik
Contributing Technical Editors: Edwin Earley, Brian Kelly, Michael Sansoterra
Publisher and Advertising Director: Jenny Thomas
Advertising Sales Representative: Kim Reed
Contact the Editors: To contact anyone on the IT Jungle Team
Go to our contacts page and send us a message.

Sponsored Links

COMMON:  Join us at the Focus 2008 workshop conference, October 5 - 8, in San Francisco, California
Profound Logic Software:  Web-enable in less than a day with Genie
Vision Solutions:  System i Management Tips Blog - Free i5/OS Tips Each Week!


 

IT Jungle Store Top Book Picks

Easy Steps to Internet Programming for AS/400, iSeries, and System i: List Price, $49.95
Getting Started with PHP for i5/OS: List Price, $59.95
The System i RPG & RPG IV Tutorial and Lab Exercises: List Price, $59.95
The System i Pocket RPG & RPG IV Guide: List Price, $69.95
The iSeries Pocket Database Guide: List Price, $59.00
The iSeries Pocket Developers' Guide: List Price, $59.00
The iSeries Pocket SQL Guide: List Price, $59.00
The iSeries Pocket Query Guide: List Price, $49.00
The iSeries Pocket WebFacing Primer: List Price, $39.00
Migrating to WebSphere Express for iSeries: List Price, $49.00
iSeries Express Web Implementer's Guide: List Price, $59.00
Getting Started with WebSphere Development Studio for iSeries: List Price, $79.95
Getting Started With WebSphere Development Studio Client for iSeries: List Price, $89.00
Getting Started with WebSphere Express for iSeries: List Price, $49.00
WebFacing Application Design and Development Guide: List Price, $55.00
Can the AS/400 Survive IBM?: List Price, $49.00
The All-Everything Machine: List Price, $29.95
Chip Wars: List Price, $29.95


 
The Four Hundred
The Power Systems M15 and M25 Versus Their Predecessors

Forget About Platforms, Let's Talk About Jobs

Zend Taps System i-PHP Guru, Pushes the i Platform

As I See It: Citizen CEO

Imtech Buys Reseller Real Solutions for U.K. Expansion

The Linux Beacon
How's Red Hat Enterprise Linux 5 Doing?

AMD Finishes Off Quad Cores with Budapest Opterons

Forget About Platforms, Let's Talk About Jobs

As I See It: Citizen CEO

Looks Like Unisys Is Reselling Sun's X4600 Opteron Boxes

Four Hundred Stuff
Bank's Approach to Biometric Authentication a 'Valid' One

Programmer Conveniences Added to BCD's WebSmart ILE

ASNA Brings RPG to .NET Migration Software to Latest Windows IDE

Safestone Re-emerges with New Corporate Identity, i OS Security Tools

NetManage and HiT Software Partner for Structured Data

Big Iron
The Back and Forth of the PSI-IBM Lawsuit

Top Mainframe Stories From Around the Web

Chats, Webinars, Seminars, Shows, and Other Happenings

System i PTF Guide
June 7, 2008: Volume 10, Number 23

May 31, 2008: Volume 10, Number 22

May 24, 2008: Volume 10, Number 21

May 17, 2008: Volume 10, Number 20

May 10, 2008: Volume 10, Number 19

May 3, 2008: Volume 10, Number 18

The Windows Observer
Microsoft Kicks Off TechEd 2008 with Gates and Previews

Dynamics AX 2009 ERP Suite Comes to Market

U.S. Drags Down Server Sales in Q1, But Weak Dollar Helps

Servers, Storage, Laptops and Weak Dollars Buoy Dell in Q1

Server Branding 101: Big Name, Big Game?

The Unix Guardian
AMD Finishes Off Quad Cores with Budapest Opterons

U.S. Drags Down Server Sales in Q1, But Weak Dollar Helps

Looks Like Unisys Is Reselling Sun's X4600 Opteron Boxes

Themis Partners with Sun to Make Sparc T2 Blade Server

Server Branding 101: Big Name, Big Game?

Four Hundred Monitor
Four Hundred Monitor's
Full iSeries Events Calendar

THIS ISSUE SPONSORED BY:

Help/Systems
Group8 Security
COMMON


Printer Friendly Version


TABLE OF CONTENTS
Keeping 5250 Alive

Seeking Advice on REXX

Admin Alert: All About the System i Attention Light

Four Hundred Guru

BACK ISSUES

From the IT Jungle Forums
Capture Sort File and Copy to Database File

SNMP Traps on i5OS

Java Messages

Copying recs from a subfile to a file and keeping highlights

Imbedded SQL

CPYFRMSTMF problem





 
Subscription Information:
You can unsubscribe, change your email address, or sign up for any of IT Jungle's free e-newsletters through our Web site at http://www.itjungle.com/sub/subscribe.html.

Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved.
Guild Companies, Inc., 50 Park Terrace East, Suite 8F, New York, NY 10034

Privacy Statement