× 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 Tomasz
I have a routine that I use to capture the data after every EXFMT.
I forget who gave me this info, which is extremely rude of me, but I will
be eternally grateful to that person.
This routine is in our order entry program, and it was notorious for giving
weird and wonderful results that we could not duplicate. When we asked how
the user had entered the data we got the usual response and that was that
they had done nothing different.
With this in the program and an
exsr Capturescreen
after every EXFMT
we were able to see EXACTLY what was entered and exactly what key (Enter,
F1, F2 etc) was pushed. Using this tool, we were able to exactly duplicate
what was entered so that if any problems arose we could guarantee that we
could duplicate the problem
I believe that I have included everything you may need.
You will obviously need to fit this code into your own program.
NOTE - the file AUDORDP on our system grows RAPIDLY. We have a scheduled
job that deletes records older than 1 week based upon the DTETIMEENT value
in the records, and because of this the file AUDORDP was created with
Reuse deleted records . . . . . REUSEDLT *YES
If it turns out that there is something missing, let me know and hopefully
I can fill in the missing pieces

The file AUDORDP to hold the captured screen data
A REF(FLDREF)
A R AUDORDR
A Company R
A Ordernbr R
A OPER R
A AUDJOB 10
A AUDJOBNBR 6 0
A KEYPRESSED 20 TEXT('Key pressed')
A DTETIMEENT Z TEXT('Time-stamp Entered')
A SCREENDATA 3564 TEXT('Screen data')
FAudordp uf a e disk usropn
F prefix('L03.')
f for the workstation infds(info)
Dinfo ds
D key 369 369
D Csrloc 370 371B 0
D sflrrn 378 379B 0
D L03 E DS Extname(Audordp)
D QUALIFIED
/copy copybook,fkeys
The above copybook contains the following code
*****************************************************************
* Standard include for all interactive programs
* named hexadecimal constants for function keys
*****************************************************************
D @f01 c const(x'31')
D @f02 c const(x'32')
D @f03 c const(x'33')
D @f04 c const(x'34')
D @f05 c const(x'35')
D @f06 c const(x'36')
D @f07 c const(x'37')
D @f08 c const(x'38')
D @f09 c const(x'39')
D @f10 c const(x'3a')
D @f11 c const(x'3b')
D @f12 c const(x'3c')
D @f13 c const(x'b1')
D @f14 c const(x'b2')
D @f15 c const(x'b3')
D @f16 c const(x'b4')
D @f17 c const(x'b5')
D @f18 c const(x'b6')
D @f19 c const(x'b7')
D @f20 c const(x'b8')
D @f21 c const(x'b9')
D @f22 c const(x'ba')
D @f23 c const(x'bb')
D @f24 c const(x'bc')
D @clear c const(x'bd')
D @enter c const(x'f1')
D @help c const(x'f3')
D @pageup c const(x'f4')
D @pagedown c const(x'f5')
D @print c const(x'f6')
D @rcbksp c const(x'f8')
D @autoenter c const(x'3f')
D @exit C const(X'33')
D @cancel C const(X'3C')
End of copybook
D Parm Ds
D Row 10i 0
D Col 10i 0
D NbrBytRtn 10i 0
D Screen 3564a
D QMHRCVPM pr extpgm('QMHRCVPM')
D MsgInfo 8a
D MsgInfoLen 10i 0 const
D FormatName 8a const
D CallStackEntr 10a const
D CallStackCtr 10i 0 const
D MsgType 10a const
D MsgKey 4a const
D WaitTime 10i 0 const
D MsgAction 10a const
D ErrorStruct like(ErrorCode)

D GetCsrAdr Pr 10i 0 ExtProc( 'QsnGetCsrAdr' )
D Row 10i 0
D Col 10i 0
D LlvEnvHdl 10i 0 Const Options( *Omit )
D ApiError 1024a Options( *Omit: *VarSize )

D CrtInpBuf Pr 10i 0 ExtProc( 'QsnCrtInpBuf' )
D InpBufSiz 10i 0 Const
D BufIncSiz 10i 0 Const Options( *Omit )
D BufMaxSiz 10i 0 Const Options( *Omit )
D InpBufHdl 10i 0 Options( *Omit )
D ApiError 1024a Options( *Omit: *VarSize )

D ReadScr Pr 10i 0 ExtProc( 'QsnReadScr' )
D NbrBytRead 10i 0 Options( *Omit )
D InpBufHdl 10i 0 Const Options( *Omit )
D CmdBufHdl 10i 0 Const Options( *Omit )
D LlvEnvHdl 10i 0 Options( *Omit )
D ApiError 1024a Options( *Omit: *VarSize )

D RtvDta Pr * ExtProc( 'QsnRtvDta' )
D InpBufHdl 10i 0 Const
D InpDtaPtr * Options( *Omit )
D InpDtaPtr * Options( *Omit )
D ApiError 1024a Options( *Omit: *VarSize )

D DltBuf Pr 10I 0 ExtProc( 'QsnDltBuf' )
D BufferHdl 10I 0 Const
D ApiError 1024a Options( *Omit: *VarSize )

D MemCpy Pr * ExtProc( 'memcpy' )
D pOutMem * Value
D pInpMem * Value
D InpMemSiz 10u 0 Value
D authenticateWithLLab...
*****************************************************************
* Routine to capture the screen data as well as what key was pressed
* that entailed the user leaving that particular screen.
*****************************************************************
/FREE
begsr Capturescreen;

if not %open(Audordp);
leavesr;
endif;

InpBufHdl = CrtInpBuf( 27 * 132
: *Omit
: *Omit
: *Omit
: *Omit ); // Create DSM input buffer

GetCsrAdr( Row
: Col
: *Omit
: *Omit ); // Determine cursor position on display
// Omit this if info not required

NbrBytRtn = ReadScr( *Omit
: InpBufHdl
: *Omit
: *Omit
: *Omit ); // Reads the screen data into buffer and return
// count of number of bytes in buffer

InpDtaPtr = RtvDta( InpBufHdl
: *Omit
: *Omit ); // retrieve pointer to DSM buffer

MemCpy( %Addr( Screen )
: InpDtaPtr
: NbrBytRtn ); // and move the contents into your own field
// Could also use the InpDtaPtr as a basing po

DltBuf( InpBufHdl: *Omit ); // delete the buffer when you're done wit

clear L03.Keypressed;
select;
when Key = @f01;
eval L03.Keypressed = 'F01';
when Key = @f02;
eval L03.Keypressed = 'F02';
when Key = @f03;
eval L03.Keypressed = 'F03';
when Key = @f04;
eval L03.Keypressed = 'F04';
when Key = @f05;
eval L03.Keypressed = 'F05';
when Key = @f06;
eval L03.Keypressed = 'F06';
when Key = @f07;
eval L03.Keypressed = 'F07';
when Key = @f08;
eval L03.Keypressed = 'F08';
when Key = @f09;
eval L03.Keypressed = 'F09';
when Key = @f10;
eval L03.Keypressed = 'F10';
when Key = @f11;
eval L03.Keypressed = 'F11';
when Key = @f12;
eval L03.Keypressed = 'F12';
when Key = @f13;
eval L03.Keypressed = 'F13';
when Key = @f14;
eval L03.Keypressed = 'F14';
when Key = @f15;
eval L03.Keypressed = 'F15';
when Key = @f16;
eval L03.Keypressed = 'F16';
when Key = @f17;
eval L03.Keypressed = 'F17';
when Key = @f18;
eval L03.Keypressed = 'F18';
when Key = @f19;
eval L03.Keypressed = 'F19';
when Key = @f20;
eval L03.Keypressed = 'F20';
when Key = @f21;
eval L03.Keypressed = 'F21';
when Key = @f22;
eval L03.Keypressed = 'F22';
when Key = @f23;
eval L03.Keypressed = 'F23';
when Key = @f24;
eval L03.Keypressed = 'F24';
when Key = @clear;
eval L03.Keypressed = 'Clear';
when Key = @enter;
eval L03.Keypressed = 'Enter';
when Key = @help;
eval L03.Keypressed = 'Help';
when Key = @pageup;
eval L03.Keypressed = 'Pageup';
when Key = @pagedown;
eval L03.Keypressed = 'Pagedown';
when Key = @print;
eval L03.Keypressed = 'Print';
when Key = @rcbksp;
eval L03.Keypressed = 'Rcbksp';
when Key = @autoenter;
eval L03.Keypressed = 'Autoenter';
when Key = @exit;
eval L03.Keypressed = 'Exit';
when Key = @cancel;
eval L03.Keypressed = 'Cancel';
other;
eval L03.Keypressed = 'Unknown';
endsl;

Populate Company
Populate Ordernbr
L03.Oper = PsdsUser;
L03.Audjob = Psdsjob;
L03.Audjobnbr = Psdsjobnbr;
L03.Dtetimeent = %timestamp;
L03.Screendata = Screen;
write Audordr;

endsr;




Tomasz Skorża
<t.skorza@agriplu
s.pl> To
Sent by: <midrange-l@xxxxxxxxxxxx>
midrange-l-bounce cc
s@xxxxxxxxxxxx
Subject
Tool for intercepting screen data
07/31/2008 10:00
AM


Please respond to
Midrange Systems
Technical
Discussion
<midrange-l@midra
nge.com>






Hi



Do you know any tool/software that allow me to "intercept" exactly data on
every field on screen when user press Enter (or any other function key)?



Regards



Tomek



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.