× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Scott,

How are you specifying the 20-minute limit?
Are you using system values or are you doing it programatically?

I control timeouts programatically:
- modify the display file by adding INVITE to the record format
- create the display file with WAITRCD
- in the RPG program:
- modify the file spec to include: maxdev(*file)
- replace exfmt rcdfmt-name with (1) write rcdfmt-name (2) read(e)
dspf-name;
- after the read(e), specify: if %status = 1331; do what you want to do
on the timeout; endif;

There were some questions/emails about CPF4737 but I didn't understand them.

Yours truly,

Glenn Gundermann
Email: glenn.gundermann@xxxxxxxxx
Work: (905) 486-1162 x 239
Cell: (416) 317-3144


On 28 December 2016 at 08:53, Scott Williams <scottwill0707@xxxxxxxxx>
wrote:

I'm still kinda new to the RPG space, and I guess it's time I actually post
a question as my research has not led me to a working result yet.

My shop has a strict 20 minute timeout setting for the workstations. This
cannot be changed. Workstations (which have static, unique names) are being
kicked (the job is ended, not disconnected) and users are losing input
data. The system kicks out a CPI1127 when this happens. They are typing
lengthy entries and/or get distracted by phone calls, co-workers, etc.
Since they do not press any function keys, rollup/down, or Enter during the
time limit, their entries are lost when the system kicks them. (Note: they
are being given ten 70 length fields to enter data in the program affected
by this timeout setting.)

I was hoping the PSSR can trap the error was have the input field written
out to a work file. A CL program will be needed to check in there is any
data out in the workfile when the resume the program. This workfile could
be cleared each night after hours to avoid left over data. The problem I'm
running into is that even after coding a PSSR routine in the program, it
isn't executed when the system ends the job. The CPI1127 message can be
found in the QSYSOPR queue, but the PSSR doesn't seem to catch this.

Here is a sample program I wrote to test that theory. The program should
write to the XT90 file unless an error occured, then it will write to XT91
instead.

H OPTION(*NODEBUGIO: *SRCSTMT)
H DFTACTGRP(*NO)
H*=========================================================
=============*
H* DATA LOSS INACTIVITY TEST PROGRAM
*
H*=========================================================
=============*
F* FILE SPECS
F*=========================================================
=============*
FXT90 UF A E DISK INFSR(*PSSR)
FXT91 UF A E DISK
FXT90DF CF E WORKSTN INFSR(*PSSR)
D*=========================================================
=============*
D* DEFINITION SPECS
D*=========================================================
=============*
** Program Status Data Structure
D SDS
D PGMMSGID 40 46a
D pgmruntime 6s 0
D PSSRDone S N
C*=========================================================
=============*
C* CALC SPECS
C*=========================================================
=============*
C*
/FREE
//FREE FORMAT CODE BELOW
DOU *IN03;
INPUT = *BLANKS;
IF *IN03;
LEAVE;
ENDIF;
MONITOR;
WRITE RECORD1;
//DO STUFF WITH RECORD
READ RECORD1;
INTXT = INPUT;
WRITE XT90R;
ON-ERROR;
//IF PGMMSGID = 'CPI1127';
INTX2 = INPUT;
WRITE XT91R;
//ENDIF;
ENDMON;
ENDDO;
*INLR = *ON;

BEGSR *PSSR;
IF PSSRDONE;
*INH1 = *ON;
RETURN;
ELSE;
//IF PGMMSGID = 'CPI1127';
INTX2 = INPUT;
WRITE XT91R;
//ENDIF;
ENDIF;
ENDSR;

/END-FREE


C*
O*=========================================================
=============*
O* OUTPUT SPECS
O*=========================================================
=============*
**
***END OF PROGRAM***


Display Source:

A R RECORD1 CF03(03)
A 1 2SYSNAME
A 2 71TIME
A 1 71DATE
A 2 2'XT90DF'
A 1 35'TEST DISPLAY'
A DSPATR(RI)
A COLOR(TRQ)
A INPUT 50 B 6 16

Am I barking up the wrong tree with PSSR and MONITOR? Thanks in advance.
--
Scott Williams
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.