Counting and capturing the keystrokes using REXX.

Time Sharing Option, Interactive System Productivity Facility and REstructured eXtended eXecutor

Moderator: mickeydusaor

Post Reply
Atharvc
New Member
Posts: 5
Joined: Sat Sep 19, 2015 10:19 pm

Counting and capturing the keystrokes using REXX.

Post by Atharvc »

Is it possible to count and capture a keystroke on the mainframe using REXX?

One possibility is that I can pull for a response from the user but what I want to do is to get a keystroke within a loop while an EXEC is actually doing something. Is this possible by any mwans or am I expecting to make REXX into something it's not supposed to do? Thanks.
Last edited by Anuj Dhawan on Mon Oct 19, 2015 7:55 pm, edited 1 time in total.
Reason: Corrected typo.
William Collins
Global Moderator
Global Moderator
Posts: 490
Joined: Sun Aug 25, 2013 7:24 pm

Re: Counting and cpturing the keystrokes using REXX.

Post by William Collins »

You're expecting anything on a Mainframe to do what it is not supposed to do. The Mainframe does not know about screens or keyboards.
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: Counting and cpturing the keystrokes using REXX.

Post by nicc »

Why not read through the language reference manual for the z/OS implementation of Rexx?
Regards
Nic
Atharvc
New Member
Posts: 5
Joined: Sat Sep 19, 2015 10:19 pm

Re: Counting and cpturing the keystrokes using REXX.

Post by Atharvc »

William Collins wrote:You're expecting anything on a Mainframe to do what it is not supposed to do. The Mainframe does not know about screens or keyboards.
Then what it knows about?

I think somehow we can do it. I'll try some more search.
Atharvc
New Member
Posts: 5
Joined: Sat Sep 19, 2015 10:19 pm

Re: Counting and cpturing the keystrokes using REXX.

Post by Atharvc »

nicc wrote:Why not read through the language reference manual for the z/OS implementation of Rexx?
THat's what I am doing but so far I am not much successful to find the answer.
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 826
Joined: Wed Sep 11, 2013 3:57 pm

Re: Counting and cpturing the keystrokes using REXX.

Post by enrico-sorichetti »

the mvs I/O model is record oriented
so the rexx script will be aware of the input data only and only when the enter key is pressed
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
William Collins
Global Moderator
Global Moderator
Posts: 490
Joined: Sun Aug 25, 2013 7:24 pm

Re: Counting and cpturing the keystrokes using REXX.

Post by William Collins »

Imagine that you have a program, language irrelevant, that runs on your machine and creates html on a server which is accessed by a user in Gnome, Alaska, to look at and enter data on. Now, in your program, on your machine, count the keystrokes, or know any "anykey" is pressed.

Now, pretend that your Mainframe is your machine, and the person in Alaska has a 3270-emulator. Same problem.

With the web-page, the user clicks a button and your program gets the data. With the 3270-emulator, the use presses Enter, or a function key and you get the data. There's also "Program Attention Keys", which you can know have been pressed, but where you won't get any data.

Feel free to try, it is good to convince yourself.
zprogrammer
Global Moderator
Global Moderator
Posts: 588
Joined: Wed Nov 20, 2013 11:53 am
Location: Mars

Re: Counting and capturing the keystrokes using REXX.

Post by zprogrammer »

Curious to know what is the objective
zprogrammer
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 826
Joined: Wed Sep 11, 2013 3:57 pm

Re: Counting and capturing the keystrokes using REXX.

Post by enrico-sorichetti »

I think somehow we can do it. I'll try some more search.
good luck :mrgreen:
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1888
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Counting and capturing the keystrokes using REXX.

Post by Robert Sample »

I think somehow we can do it. I'll try some more search.
Search all you want. A PC basically handles the keyboard by allowing the CPU to examine each keystroke as it is typed. A mainframe basically handles the keyboard by allowing all the typing desired and not examining the keyboard buffer until a special character (ENTER, PF key, PA key, etc.) is typed. So if you expect to count keystrokes and do something in a loop in REXX, that loop will behave DRASTICALLY differently on a mainframe than it will on a PC. Mainframes do not process individual keystrokes but only screens of data.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “TSO, ISPF & REXX (Do you still do CLIST?!).”