Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

content of cursor position

6 views
Skip to first unread message

Mackenzie, Ken

unread,
May 22, 2001, 7:21:38 AM5/22/01
to
Baskar,

You could put the following two lines in the )PROC section of your panel:
&CSRPOS = .CSRPOS
&CURSOR = .CURSOR

And the ISPF variables CSRPOS & CURSOR will be set. CURSOR will contain the
name of the field containing the cursor and CSRPOS will contain the position
of the cursor within that field.

HTH,

Ken MacKenzie

> -----Original Message-----
> From: Subramaniam Baskaran [SMTP:Subramania...@DB.COM]
> Sent: Tuesday, May 22, 2001 12:51 PM
> To: ISP...@listserv.nd.edu
> Subject: content of cursor position
>
> *** Warning : This message originates from the Internet ***
>
> Hello List users
>
> We are designing a ISPF panel for a query output.
> From this ISPF panel , the contents of the cursor position has to be
> captured and used in the program.
> I am aware on the ways to implement this in an edit macro.
> Can anybody suggest a way to implement this.
>
> Tia
> Baskar
>
>
>
>
>
>
>
> --
>
> Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
> Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail
> irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und
> vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte
> Weitergabe dieser Mail ist nicht gestattet.
>
> This e-mail may contain confidential and/or privileged information. If you
> are not the intended recipient (or have received this e-mail in error)
> please notify the sender immediately and destroy this e-mail. Any
> unauthorised copying, disclosure or distribution of the material in this
> e-mail is strictly forbidden.


The Royal Bank of Scotland plc is registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB.

The Royal Bank of Scotland plc is regulated by IMRO, SFA and Personal Investment Authority.

This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer.

'Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent.'

Subramaniam Baskaran

unread,
May 22, 2001, 7:22:48 AM5/22/01
to

Lindy Mayfield

unread,
May 22, 2001, 7:35:07 AM5/22/01
to
Hello Baskar,

Is this what you are speaking of?

Cheers,
Lindy


/* Rexx */
Trace O

"Isredit Macro NOPROCESS"

"Isredit (line, col) = Cursor"

Say Line Col

Exit 0

-----Original Message-----
From: Subramaniam Baskaran [mailto:Subramania...@DB.COM]
Sent: Tuesday, May 22, 2001 13:51
To: ISP...@listserv.nd.edu
Subject: content of cursor position

Paul Hanrahan

unread,
May 22, 2001, 8:49:34 AM5/22/01
to
Hi:

csrpos = CURSOR(variable name)

where variable name is the name of a panel field
then

Address ISPEXEC 'DISPLAY PANEL(panel name)' csrpos

also there's a type of cursor positioning the goes on with the ispf table
functions.

Paul


-----Original Message-----
From: ISPF discussion list [mailto:ISP...@listserv.nd.edu]On Behalf Of
Subramaniam Baskaran
Sent: Tuesday, May 22, 2001 7:51 AM
To: ISP...@listserv.nd.edu
Subject: content of cursor position

Lindy Mayfield

unread,
May 22, 2001, 8:57:34 AM5/22/01
to
Hello Baskar,

Sorry, I did not completely understand your question originally.

I did the following test, which may meet your needs:

Panel:
***************************** Top of Data ******************************
)ATTR
% TYPE(TEXT) INTENS(HIGH) COLOR(TURQ) CAPS(OFF)
_ TYPE(INPUT) INTENS(HIGH) COLOR(TURQ) HILITE(USCORE)
$ TYPE(INPUT) INTENS(NON)
! TYPE(TEXT) INTENS(LOW) COLOR(TURQ) CAPS(OFF)
+ TYPE(TEXT) INTENS(LOW) COLOR(GREEN) CAPS(OFF)
§ TYPE(TEXT) INTENS(LOW) COLOR(WHITE) CAPS(OFF)
)BODY
%-------------------- Test Menu for Cursor Position ------------------
%
%Option ===>_ZCMD
%
%
%
% Var1 $Var1 %Var2 $Var2 %
%
% Var3 $Var3 %Var4 $Var4 %
%
%
)PROC

&CSRPOS = .CSRPOS
&CSRROW = .CSRROW
&CSRVAR = .CURSOR

)END

Rexx:
*****************************
/* Rexx */

Trace Off

Address Ispexec

"Display Panel(TEST) "

Say Csrpos
Say Csrrow
Say Csrvar
Exit 0
****************************


Displayed Panel:


Var1 Var2

Var3 Var4 ____x________


X is where I put the cursor. It returned the following:

00000005
00000000
VAR4
***

Var4 is variable name, and 5 is the position of the cursor in that field.
CSRROW variable is only applicable in table displays.

Hope this helps.
Lindy


-----Original Message-----
From: Subramaniam Baskaran [mailto:Subramania...@db.com]
Sent: Tuesday, May 22, 2001 15:26
To: Lindy Mayfield
Subject: Re: content of cursor position

Hello Lindy

Thanks for sending ur suggestions.
However this is will not work on an ISPF panel.
What I want is something like this,
from a program I am displaying a panel, in this panel I place the cursor
and ENTER.
Noe inside the program , I should be able to get the contents of the cursor
position delimieted by spaces.

TIA

Heinz-Bernd Leifeld

unread,
May 22, 2001, 9:28:43 AM5/22/01
to
Baskar,

if you do not want depend on the fieldname (because of dynamic area) just have a
look at Doug's VCURSOR. It works with ZSCREENI (Screen-Image) and
ZSCREENC(Position of the Cursor within this screen-image). So you can extract
the value of the screen at cursorposition. Those field's were undocumentd a
while but are now official.

'VGET (ZSCREENI,ZSCREENC)' /* Extract screen image and cursor pos */
Say ZscreenI
Say ZscreenC
Say substr(ZSCREENI,ZscreenC+1,13)

Just give it a try, it's great.

Regards
Heinz-Bernd

--
Heinz-Bernd Leifeld
Provinzial Versicherungen Duesseldorf
Abtlg: KIP 3 / ETS C00
D-40195 Duesseldorf

Paul Hanrahan

unread,
May 22, 2001, 3:26:09 PM5/22/01
to
hi:

anyone ever use tbdispl in combination with more than one table with a
common index tying the tables together? is this possible?

paul

-----Original Message-----
From: ISPF discussion list [mailto:ISP...@listserv.nd.edu]On Behalf Of
Subramaniam Baskaran
Sent: Tuesday, May 22, 2001 7:51 AM
To: ISP...@listserv.nd.edu
Subject: content of cursor position

Paul Hanrahan

unread,
May 22, 2001, 3:35:43 PM5/22/01
to
hi

maybe i should just combine the two tables though for each nine rows in the
one sixteen of the columns will repeat over and over

-----Original Message-----
From: ISPF discussion list [mailto:ISP...@listserv.nd.edu]On Behalf Of
Subramaniam Baskaran
Sent: Tuesday, May 22, 2001 7:51 AM
To: ISP...@listserv.nd.edu
Subject: content of cursor position

Mackenzie, Ken

unread,
May 22, 2001, 3:39:57 PM5/22/01
to
> 'VGET (ZSCREENI,ZSCREENC)' /* Extract screen image and cursor pos */
> Say ZscreenI
> Say ZscreenC
> Say substr(ZSCREENI,ZscreenC+1,13)

> Just give it a try, it's great.

Heinz-Bernd,

I saw this post and I thought "Great, I've been looking for something like
this for some time!". However, my elation was short-lived ...

I use a 27*132 screen with Screen Format set to "MAX" (on the SETTINGS
panel) and I tried a simple loop:
"VGET (ZSCREEND, ZSCREENW)"
"VGET (ZSCREENI, ZSCREENC)"
ll = Length(zscreeni)
Do i = 1 To ll By zscreenw
Say Substr(zscreeni, i, zscreenw)
End

The trouble is that the actual data display (in EDIT, for example) is only
80-bytes but ZSCREENW contains 132 - this makes it hard to do any sort of
line processing.

Any ideas, anyone?

Dave Salt

unread,
May 22, 2001, 3:54:51 PM5/22/01
to
While on the topic of ZSCREENI, I just noticed ISPF messages are no longer
included as part of the screen image under OS390 v2.10. We have several
utilities which rely on messages appearing as part of the screen image. To
ensure it's not just an installation issue can anyone else confirm this
observation? Thanks!

Dave Salt


>From: "Mackenzie, Ken" <Ken.Ma...@RBS.CO.UK>
>Reply-To: ISPF discussion list <ISP...@listserv.nd.edu>
>To: ISP...@listserv.nd.edu
>Subject: Re: content of cursor position

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Doug Nadel

unread,
May 22, 2001, 6:05:55 PM5/22/01
to
Which screen image are you referring to? Tutorials will have the message number shown if
you are running in TEST mode. I doubt any of that information will show up in ZSCREENI
though because the variable is based upon an image of the screen before various changes
are made to it such as command line movement, pfkeys showing etc.
In 4.8, it was based on a different set of information, but that lead to wrong results for
some cases like popup windows.


Doug Nadel
----------------------------------------
ISPF and OS/390 Tools & Toys page:
http://somebody.home.mindspring.com/

Mail containing HTML or any attachments, including vcf files, is
automatically discarded. If you need to send me an attachment,
please let me know so that I can change my email filters.

Doug Nadel

unread,
May 22, 2001, 6:39:06 PM5/22/01
to
On Tue, 22 May 2001 20:22:25 +0100, Ken wrote:

>
>The trouble is that the actual data display (in EDIT, for example) is only
>80-bytes but ZSCREENW contains 132 - this makes it hard to do any sort of
>line processing.

There doesn't seem to be a variable that has the real screen width for a mod5 type
terminal that isn't showing the max size. This worked for me in R10, but I didn't do much
testing with it and it depends on undoc'ed internal data. It might not work well for pop
up windows. Your mileage may vary. (all the usual caveats...)


/* REXX use new zscreen vars. must not be invoked w/ suspend keyword */
Address ispexec
'VGET (ZSCREENI,ZSCREENC)'
tcb = ptr(540) /* TCB (EXEC command) PSATOLD */
tcb = ptr(tcb+132) /* TCB (ISPTASK) TCBOTC */
fsa = ptr(tcb+112) /* first save area TCBFSA */
r1 = ptr(fsa+24)
tld = ptr(r1) /* TLD address */
clswd = ptr(tld+192) /* best guess at real width */
Say copies('=',clswd-1)

xx= strip(zscreeni,'T') /* show the screen */
Do While xx\=''
Say substr(xx,1,clswd-1)
xx=delstr(xx,1,clswd)
End
Say copies('=',clswd-1) /* show cursor offset */
Say 'Length is 'length(zscreeni)', Cursor offset is 'zscreenc+0
Say copies('=',clswd-1)
Exit
ptr: Return c2d(storage(d2x(Arg(1)),4))

Mackenzie, Ken

unread,
May 23, 2001, 3:44:49 AM5/23/01
to
> There doesn't seem to be a variable that has the real screen width for a
mod5 type
> terminal that isn't showing the max size. This worked for me in R10, but
I didn't do much
> testing with it and it depends on undoc'ed internal data. It might not
work well for pop
> up windows. Your mileage may vary. (all the usual caveats...)
Thanks Doug - as always a mine of information. That worked a treat - look
forward to seeing it "officially" in a future release :-)

Ken MacKenzie

Dave Salt

unread,
May 23, 2001, 10:08:22 AM5/23/01
to
>From: Doug Nadel <some...@MINDSPRING.COM>

>Which screen image are you referring to? Tutorials will have the message
>number shown if
>you are running in TEST mode. I doubt any of that information will show up
>in ZSCREENI
>though because the variable is based upon an image of the screen before
>various changes
>are made to it such as command line movement, pfkeys showing etc.
>In 4.8, it was based on a different set of information, but that lead to
>wrong results for
>some cases like popup windows.

Hi Doug,

I'm refering to any ISPF screen image (not just tutorials). For example,
suspose I enter "SAVE LIST" on a member list command line. This results in
the message "List Saved". I then press HELP, which results in the long help
message "The member list was saved in 'DBAT.SALTDP.LIST.MEMBERS'". I then
execute the program you just sent out (the one which echoes the screen
image), and neither the short or long messages are visible in the ZSCREENI
variable. In other words, under OS/390 v2.10, ZSCREENI no longer reflects
the "true" screen image as visible to the user. I repeated the same test on
our production site (which is still OS/390 v2.08), and the messages WERE
included in the ZSCREENI variable.

Some of our utilities depend on messages being visible in ZSCREENI. As an
example, users have been taught they can enter "BR" on any command line,
point the cursor at a data set name appearing anywhere on the screen, and
press ENTER to BRowse that data set. However, if the data set name appears
in a message (as in the previous "SAVE LIST" example), the BR command no
longer works. Any suggestions? Many thanks,

Dave Salt

>
>On Tue, 22 May 2001 19:39:57 -0000, you wrote:
>
> >While on the topic of ZSCREENI, I just noticed ISPF messages are no
>longer
> >included as part of the screen image under OS390 v2.10. We have several
> >utilities which rely on messages appearing as part of the screen image.
>To
> >ensure it's not just an installation issue can anyone else confirm this
> >observation? Thanks!
> >
> >Dave Salt
> >
> >

_________________________________________________________________________

Mark Zelden

unread,
May 23, 2001, 10:48:24 AM5/23/01
to
On Wed, 23 May 2001 13:50:37 -0000, Dave Salt <ds...@HOTMAIL.COM> wrote:

<snip>


>In other words, under OS/390 v2.10, ZSCREENI no longer reflects
>the "true" screen image as visible to the user. I repeated the same test on
>our production site (which is still OS/390 v2.08), and the messages WERE
>included in the ZSCREENI variable.
>
>Some of our utilities depend on messages being visible in ZSCREENI. As an
>example, users have been taught they can enter "BR" on any command line,
>point the cursor at a data set name appearing anywhere on the screen, and
>press ENTER to BRowse that data set. However, if the data set name appears
>in a message (as in the previous "SAVE LIST" example), the BR command no
>longer works. Any suggestions? Many thanks,
>

I guess that is the problem with developing "toys" that use unsupported
features and letting "users" have access to them. If its a group of
sysprogs that know the caveats, thats another thing.

Mark

+------------------------------------------------------------------+
| Mark Zelden - OS/390 Consultant: 3D Business Solutions, Chicago |
| mailto:mze...@flash.net mailto:mze...@3dsolutions.com |
| Mark's MVS Utilites: http://home.flash.net/~mzelden/mvsutil.html |
+------------------------------------------------------------------+

Gilbert Saint-Flour

unread,
May 23, 2001, 11:18:13 AM5/23/01
to
On 23 May 2001 at 09:26, Mark Zelden <mze...@FLASH.NET> said:

>>Some of our utilities depend on messages being visible in ZSCREENI. As an
>>example, users have been taught they can enter "BR" on any command line,
>>point the cursor at a data set name appearing anywhere on the screen, and
>>press ENTER to BRowse that data set. However, if the data set name appears
>>in a message (as in the previous "SAVE LIST" example), the BR command no
>>longer works. Any suggestions? Many thanks,

>I guess that is the problem with developing "toys" that use unsupported
>features and letting "users" have access to them. If its a group of
>sysprogs that know the caveats, thats another thing.

I wouldn't consider this a "problem", merely a restriction. I've used the "point-and-shoot" technique described above long before ZSCREENI existed and made it popular via the DSLIST and FASTPATH programs in my contribution to the CBT tape. Being able to "point-and-shoot" into Browse or EDIT is a significant productivity enhancer, even when pop-up messages remain out of reach.

The logical screen buffer that I use (and that ZSCREENI now returns) does not contain the text of the messages which is stored outside of the buffer and "overlayed" on your screen using physical 3270 display attributes. In other words, if you want to point-and-shoot to the text of a message (as some products do), then you have to build your own "physical" image of the 3270 screen by locating the text of the message in memory and using it to overlay the corresponding area of the ZSCREENI logical screen buffer. This requires a bit of coding and, one day, I'll probably enhance FASTPATH to do it, as users have asked for it on several occasions and I feel the need for it myself.

Gilbert Saint-flour
Automated Migration Services
http://members.home.net/gsf/

Dave Salt

unread,
May 23, 2001, 11:57:23 AM5/23/01
to
Hi Gilbert,

I guess what it all comes down to is, what exactly is the ZSCREENI variable
susposed to contain? If it's the "SCREEN Image" (as the name seems to
suggest), then you'd expect it to include everything the user can see,
including messages. This was, in fact, the way it worked under OS/390 v2.08.
I'll admit there are some nice changes to ZSCREENI under v2.10, including
the fact it now supports pop-up panels. However, no longer having the
message included with the screen image is a big loss.

You seem to indicate it's possible to determine message contents and
location. Do you know if this can be done in REXX, or have any sample logic?
I'd really like to get our utilities working again. In the long term, I'd
much prefer to see IBM include this as part of the native ZSCREENI utility
(or create a separate utility which includes the screen and the messages;
e.g. ZSCREENM?). This seems much better than having to revert back to home
grown utilities again. Thanks!

Dave Salt

>From: Dave Salt <DS...@HOTMAIL.COM>
> >>Some of our utilities depend on messages being visible in ZSCREENI. As
>an
> >>example, users have been taught they can enter "BR" on any command line,
> >>point the cursor at a data set name appearing anywhere on the screen,
>and
> >>press ENTER to BRowse that data set. However, if the data set name
>appears
> >>in a message (as in the previous "SAVE LIST" example), the BR command no
> >>longer works. Any suggestions? Many thanks,
>

>From: Gilbert Saint-Flour <g...@HOME.NET>
>I wouldn't consider this a "problem", merely a restriction. I've used the
>"point-and-shoot" technique described above long before ZSCREENI existed
>and made it popular via the DSLIST and FASTPATH programs in my contribution
>to the CBT tape. Being able to "point-and-shoot" into Browse or EDIT is a
>significant productivity enhancer, even when pop-up messages remain out of
>reach.
>
>The logical screen buffer that I use (and that ZSCREENI now returns) does
>not contain the text of the messages which is stored outside of the buffer
>and "overlayed" on your screen using physical 3270 display attributes. In
>other words, if you want to point-and-shoot to the text of a message (as
>some products do), then you have to build your own "physical" image of the
>3270 screen by locating the text of the message in memory and using it to
>overlay the corresponding area of the ZSCREENI logical screen buffer. This
>requires a bit of coding and, one day, I'll probably enhance FASTPATH to do
>it, as users have asked for it on several occasions and I feel the need for
>it myself.
>

_________________________________________________________________________

Mark Zelden

unread,
May 23, 2001, 11:52:44 AM5/23/01
to
On Wed, 23 May 2001 10:45:15 -0400, Gilbert Saint-Flour <g...@HOME.NET>
wrote:

>>
>I wouldn't consider this a "problem", merely a restriction. I've used
> the "point-and-shoot" technique described above long before ZSCREENI
> existed and made it popular via the DSLIST and FASTPATH programs in my
> contribution to the CBT tape. Being able to "point-and-shoot" into
> Browse or EDIT is a significant productivity enhancer, even when pop-up
> messages remain out of reach.

Agreed that it can be a significant productivity enhancer. I use
FASTPATH myself, but if I was a sysprog employee, I'm not sure I
would advertise it to all users as a supported utility.

Anyway, what I was referring to was the original poster's use
of the new variables prior to R10 when they were documented
and "supported".

Ryerse, Robin

unread,
May 23, 2001, 1:11:53 PM5/23/01
to
Dave; In Windows, do you "see" a message associated with an application as
being part of the original pane or an addendum to the original. I think not;
same hold for ISPF

-----Original Message-----
From: Dave Salt [mailto:ds...@HOTMAIL.COM]
Sent: Wednesday, May 23, 2001 11:43 AM
To: ISP...@listserv.nd.edu
Subject: Re: content of cursor position


Hi Gilbert,

Dave Salt

>I wouldn't consider this a "problem", merely a restriction. I've used the
>"point-and-shoot" technique described above long before ZSCREENI existed
>and made it popular via the DSLIST and FASTPATH programs in my contribution
>to the CBT tape. Being able to "point-and-shoot" into Browse or EDIT is a
>significant productivity enhancer, even when pop-up messages remain out of
>reach.
>

Dave Salt

unread,
May 23, 2001, 1:30:00 PM5/23/01
to
>From: "Ryerse, Robin" <Robin....@STELCO.CA>

>Dave; In Windows, do you "see" a message associated with an application as
>being part of the original pane or an addendum to the original. I think
>not;
>same hold for ISPF

Hmmm, interesting question. What about the contents of input and output
fields; would they be considered part of the original panel or an addendum
to the original?

To me, the bottom line is "screen image" should be what's on the screen.
Maybe I'm alone in that thought (wouldn't be the first time!).

Dave Salt

Doug Nadel

unread,
May 23, 2001, 3:14:01 PM5/23/01
to
As mentioned before there are 2 places the screen image is stored. The old way (4.8) used
one and the new way uses the other. There are a number of problems using the old way. I
can't recall what they all were, but pop-ups, SELECT ... SUSPEND, and MODE(FSCR) come to
mind. Not sure about it now; it was a long time ago. But here is the basic outline of
the old and new ways. Just move the two commented assignments around to see the
difference. Note that 5.0 doesn't use a translate, it actually goes through all the
control blocks to find where attribute bytes are, but this method will give a fairly close
approximation to the screen image. This way there may be readable non-alpha characters
where attribute bytes are though (hence the nasty gyrations in that VCURSOR exec).
[This is actually a bunch of stuff that has been done by people since at least the mid
'80s - I remember talking to people at SHARE about it in '87 or so, and they'd been doing
it for years before that]

/* REXX use new zscreen vars. must not be invoked w/ suspend keyword */
Address ispexec

tcb = ptr(540) /* TCB (EXEC command) PSATOLD */
tcb = ptr(tcb+132) /* TCB (ISPTASK) TCBOTC */
fsa = ptr(tcb+112) /* first save area TCBFSA */
r1 = ptr(fsa+24)
tld = ptr(r1) /* TLD address */

p = ptr( 96+tld) /* new way */
p = ptr(128+tld) /* old way */
Address ispexec 'VGET (ZSCREENW,ZSCREEND)'
trtable=xrange('00'x,'3f'x)
xx=translate(storage(d2x(p),zscreenw*zscreend),,trtable)
/* xx now contains ZSCREENI more or less */
Say copies('=',zscreenw-1)
xx= strip(xx,'T')
do while xx\=''
say substr(xx,1,zscreenw-1)
xx=delstr(xx,1,zscreenw)
end
exit

Dave Salt

unread,
May 23, 2001, 4:56:30 PM5/23/01
to
Hi Doug,

I tried the attached code using the "old" way and it works great! I get the
entire screen image, including messages. As you said, the only downside is
that certain attribute characters appear in the image, but that's something
I can live with. Thanks!

Dave Salt

P.S. In the long term, I still think ZSCREENI should return the actual
screen image. Any chance of getting ZSCREENI updated, or a new variable
created (e.g. ZSCREENM) as previously suggested? I don't want to push my
luck, but it doesn't hurt to ask! Thanks again...


>From: Doug Nadel <some...@MINDSPRING.COM>
>Reply-To: ISPF discussion list <ISP...@listserv.nd.edu>

>To: ISP...@listserv.nd.edu
>Subject: Re: content of cursor position

_________________________________________________________________________

0 new messages