TechTalk: Device Error Recovery

Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

Have you ever had someone accidentally trip over a display station power cord and wish you could just pick up where you left off without any hassle? Or more likely, have you had your UPS keep the system and controlling console running while dozens of users despair over not having their display on a UPS circuit during a two-second outage?

Left to its own devices--so to speak--a message will be issued to QSYSOPR and you'll be left with a device that must be manually brought back up to the point of failure. But system value QDEVRCYACN determines the default device recovery action which is to be taken when an error occurs. And with it comes the ability to recover almost completely.

There are several new alternatives, as of V1R3, but my favorite is *DSCMSG. This causes the job to be disconnected, much like issuing the DSCJOB command. Unlike DSCJOB, however, when you sign back on you will be presented with an error recovery screen. From here you may choose to have the previous job ended or to attempt recovery. If you attempt recovery, the job is resumed and the program is returned with an error status. For RPG programs, this means the indicator in columns 56-57 comes on or the *INFSR routine gains control, if specified. The *STATUS code in INFDS will have the value 01255, which indicates that a session error occurred, and the major return code will be 83. All that is necessary is to redisplay the screen or repeat the EXFMT instruction. Any data the operator had already keyed on the format will be lost, but otherwise the program can continue as if nothing had happened.

If you don't normally include *INFSR or error indicators in your programs, consider the use of *DSCENDRQS instead of *DSCMSG. This also disconnects the job, but upon sign-on will issue an ENDRQS for the current request level. While not as full of a recovery as *DSCMSG, it does keep the rest of the job intact and can still allow operators to resume operations more quickly.

If you only have full error handling in selected mission critical programs or applications, you can use CHGJOB DEVRCYACN(*DSCMSG) in the CL prior to loading the programs and CHGJOB DEVRCYACN(xxx) upon completion. Individual job descriptions may also have a device recovery action other than the default *SYSVAL by using CHGJOBD DEVRCYACN(xxx).

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  •  

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: