Shake Client Access

1780 pts.
Tags:
AS/400
AS/400 errors
Anybody have a good idea on how to shake client access? I can do it in a web browser using javascript. But I want to shake client access screen. I could call some windows program if I knew of a windows program already out there that would shake the screen. I want to do this for a BIG TIME error. The users just don't see it. My next solution is creating shocking keyboards and mice. Boss won't let me try it yet on anyone...lol

Thanks for any ideas

Answer Wiki

Thanks. We'll let you know when a new response is added.

I’m in favor of wiring up the chairs!

=========================================================

Wiring chairs gets expensive, especially the programming to control the circuits.

I can imagine possible uses of the DSM APIs, as well as uses of WRITE … AFTER ROLLING in COBOL (which can give some very nice data entry effects as well as rolling log or status file displays).

Maybe something like this could be useful:<pre>
/* CRTCMD CMD( QGPL/DSPLNGTXT ) +
PGM( QSYS/QUILNGTX ) +
SRCFILE( mylib/QCMDSRC ) +
ALLOW( *IMOD *IPGM *EXEC *INTERACT ) +
*/

DSPLNGTXT: CMD PROMPT(‘Display long text’) /* QUILNGTX */

PARM KWD(TXT) TYPE(*CHAR) LEN(3000) MIN(1) +
EXPR(*YES) CASE(*MIXED) CHOICE(‘*char +
3000′) PROMPT(‘Text to display’)

PARM KWD(TXTLEN) TYPE(*INT4) MIN(1) CHOICE(‘*dec +
(5 0)’) PROMPT(‘Length of text’)

PARM KWD(MSGID) TYPE(*CHAR) LEN(7) +
PROMPT(‘Message ID’)

/* MSGF: The qualified name of the *msgf to get message from… */

PARM KWD(MSGF) TYPE(MSGFNAM) PROMPT(‘Qualified +
message file name’)
MSGFNAM: QUAL TYPE(*NAME) LEN(10) DFT(QCPFMSG)
QUAL TYPE(*NAME) LEN(10) DFT(*LIBL) +
SPCVAL((*LIBL)) PROMPT(‘Message file +
library’)

/* */
/* ERRCOD: Required ERRCODE definition minimum… */
/* */

PARM KWD(ERRCOD) TYPE(*INT4) CONSTANT(0)</pre>
I had the most difficulty in coming up with an example to show how it might be used. This <b>should</b> copy/paste directly into a SEU display for any kind of CL program:<pre>
pgm

DSPLNGTXT TXT(‘– w w h h ooo aa +
!! –
— w w w h h o o a a +
!! +
— w w w w hhhhh o o +
aaaaaa –
— w w h h ooo a a !!’) TXTLEN(265)

endpgm</pre>
That’s hardly a great example. I just fiddled around for a few minutes trying to cause something readable to display. I’m sure a real display designer could come up with something better.

The *CMD is mostly to make the API (QUILNGTX) easily accessible in CL. A direct prototyping of the API into a procedure that could be called at any time would be more useful. The *CMD should help to grasp what the API does and how it works. The word-wrapping makes my example harder than the API actually is.

Tom

Discuss This Question: 8  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    Hmmm... after pasting the CL in above, I see that this editor added a single blank at the beginning of each line. I'm not sure if that will make a huge difference, but it's probably a good idea to trim one space from each line in Notepad before pasting into SEU. YMMV. Tom
    125,585 pointsBadges:
    report
  • Littlepd
    As an alternative, you could make the error message text blink and change color and lock the keyboard so that any further keystrokes cause a beep to be emitted from the PC.
    1,130 pointsBadges:
    report
  • RonKoontz
    I could do all that but like he shaking you can do in an HTML browser using javascript. There has to be away to do it.
    1,780 pointsBadges:
    report
  • Koohiisan
    It would have to be a Windows program...but...how? I know that you could install on every machine that would need this effect, or in a folder mapped to or accessible to every machine, a Windows program. That program can be called by strpco/runpccmd(?). Then, the program gets the handle of the Client Access window and uses Windows APIs to move it around, leaving it alone for a few milliseconds before moving it again. I've done some similar tricks with 'helper' programs in Windows, but in my case I was using a Visual Basic 6 program called from a strpco session that grabbed the handle of my window and hid it temporarily. Perhaps there is some program out there that you can use that would do this. Or, if you have some Windows coding skills, you may want to look into some of the Windows APIs that are available. HTH.
    5,020 pointsBadges:
    report
  • RonKoontz
    Thats exactly what I want to do. We use terminal services so all I need to do is install the window program on the server. So I need a windows program to do this.. Any ideas anyone?
    1,780 pointsBadges:
    report
  • TomLiotta
    It's not particularly difficult to reposition a window multiple times in order to give a "shaking" effect. Where it would seem to get tricky would be getting a window that belonged to a different program/application and making that other program's window shake. The emulator window isn't yours. I.e., it won't be a window that is created and maintained by whatever program you create or use. It might not even be a "window" -- it might be full-screen. I'm sure it could be done, but I wouldn't even want to do the work needed to identify the process and then identify which window. If you can't pop-up a window (e.g., via QUSLNGTX API), then the best you might be able to do is access the presentation space. The iSeries Access emulator APIs would allow you to grab the 'color' layer for example. I suppose you could zip through the array and invert each color a few times. It should at least give a striking result if nothing else as the entire window inverted colors in a cycle for however many times you chose, until some event like clicking a mouse happened. I suppose. You'd still want to be sure about which window (which session) was involved. Tom
    125,585 pointsBadges:
    report
  • RonKoontz
    I found some VB windows code that shakes the screen when the program is called. All I need to do it compile it and try it out. It looks like it shakes the screen that is up or active/lactive on the clients screen. So that should work. Unless soemone has a program that is already compiled? I have my doubts on some of the code that I got online.
    1,780 pointsBadges:
    report
  • Koohiisan
    After a bit of research into my code, I see that I used my Windows program to start Client Access. When you use VB6's 'shell' command to run a program, you are _provided_ with the handle of that program. Then, you are free to use such APIs as 'SetWindowPos' to affect it. But, if you've found a program ready-to-use, it would be worth it for you to test it out, unless you are also a VB6 guru and ready to take this on... ;)
    5,020 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following