Discussion:
TBSARG/TBSCAN/TBDISPL - what am I doing wrong?
(too old to reply)
Bill
2006-12-12 17:58:32 UTC
Permalink
List -

I've got a simple program where I want to display certain rows of a table if
a column contains a certain value. I do:

TBTOP

TBSARG

TBSCAN

TBDISPL

My panel has )MODEL ROWS(SCAN)


When the panel comes up I get only the last row (that has the column set to
the value) displayed.

Who can help?

Thanks,

Bill
Dave Salt
2006-12-12 19:25:34 UTC
Permalink
Bill,

Does the displayed table only contain one row? Or does it contain many rows,
and is only displaying the last one? In other words, can you scroll up?

Dave Salt
SimpList(tm) - The easiest, most powerful way to surf a mainframe!
http://www.mackinney.com/products/SIM/simplist.htm
Subject: TBSARG/TBSCAN/TBDISPL - what am I doing wrong?
Date: Tue, 12 Dec 2006 09:05:24 -0800
List -
I've got a simple program where I want to display certain rows of a table if
TBTOP
TBSARG
TBSCAN
TBDISPL
My panel has )MODEL ROWS(SCAN)
When the panel comes up I get only the last row (that has the column set to
the value) displayed.
Who can help?
Thanks,
Bill
_________________________________________________________________
Off to school, going on a trip, or moving? Windows Live (MSN) Messenger lets
you stay in touch with friends and family wherever you go. Click here to
find out how to sign up! http://www.telusmobility.com/msnxbox/
Bill
2006-12-12 19:56:34 UTC
Permalink
Only one row is displayed.

----- Original Message -----
From: "Dave Salt" <***@HOTMAIL.COM>
To: <ISPF-***@listserv.nd.edu>
Sent: Tuesday, December 12, 2006 10:26 AM
Subject: Re: TBSARG/TBSCAN/TBDISPL - what am I doing wrong?
Post by Dave Salt
Bill,
Does the displayed table only contain one row? Or does it contain many rows,
and is only displaying the last one? In other words, can you scroll up?
Dave Salt
SimpList(tm) - The easiest, most powerful way to surf a mainframe!
http://www.mackinney.com/products/SIM/simplist.htm
Subject: TBSARG/TBSCAN/TBDISPL - what am I doing wrong?
Date: Tue, 12 Dec 2006 09:05:24 -0800
List -
I've got a simple program where I want to display certain rows of a table if
TBTOP
TBSARG
TBSCAN
TBDISPL
My panel has )MODEL ROWS(SCAN)
When the panel comes up I get only the last row (that has the column set to
the value) displayed.
Who can help?
Thanks,
Bill
_________________________________________________________________
Off to school, going on a trip, or moving? Windows Live (MSN) Messenger lets
you stay in touch with friends and family wherever you go. Click here to
find out how to sign up! http://www.telusmobility.com/msnxbox/
Rob Zenuk
2006-12-12 19:30:14 UTC
Permalink
Here is a very simple example of using the TB services for a TBDISPL. I
think it does what you want. I find this sequence of TB commands useful in this
case. It creates and loads a small table with names and provides a last
name search. Put it in your SYSEXEC and call it from Option 6 or use "TSO
execname" from any screen. To use the lastname search, include a few leading
characters of a valid last name in the table (F or R with current data) when you
invoke the EXEC "TSO execname F". Don't forget to put the panel somewhere in
your ISPPLIB concatenation.

/* rexx */
arg searchlnam
table = 'TESTTAB'
name.1 = '001 Fred Flintstone'
name.2 = '002 Barney Rubble'
name.3 = '003 Wilma Flintstone'
name.4 = '004 Betty Rubble'
name.5 = '005 Pebbles Flintstone'
name.6 = '006 BamBam Rubble'
address ISPEXEC "TBCREATE" table "KEYS(NUM ) NAMES(FNAM LNAM) REPLACE"
do i=1 to 6
parse var name.i num fnam lnam
address ISPEXEC "TBADD" table
end
address ISPEXEC "TBSORT" table "FIELDS(LNAM,C,A,FNAM,C,A)"
address ISPEXEC "TBVCLEAR" table
lnam = searchlnam'*'
address ISPEXEC "TBSARG" table "NAMECOND(LNAM,EQ)"
address ISPEXEC "TBTOP" table
address ISPEXEC "TBDISPL" table "PANEL(TBBUILD)"
address ISPEXEC "TBCLOSE" table


)ATTR
# TYPE(OUTPUT) CAPS(OFF) COLOR(GREEN)
)BODY
%Command ===>_ZCMD %Scroll ===>_Z +
+NUM First Name Last Name
)MODEL ROWS(SCAN)
#NUM+#FNAM #LNAM
)INIT
.ZVARS = '(FSCR)'
IF (&FSCR = &Z)
&FCSR = 'CSR'
)PROC
)END


Hope This Helps,

Rob




In a message dated 12/12/2006 10:39:35 AM US Mountain Standard Time,
***@SOCAL.RR.COM writes:

I've got a simple program where I want to display certain rows of a table if
a column contains a certain value. I do:

TBTOP

TBSARG

TBSCAN

TBDISPL

My panel has )MODEL ROWS(SCAN)


When the panel comes up I get only the last row (that has the column set to
the value) displayed.

Who can help?
Frank Clarke
2006-12-12 22:58:39 UTC
Permalink
Post by Bill
List -
I've got a simple program where I want to display certain rows of a table if
TBTOP
TBSARG
TBSCAN
TBDISPL
My panel has )MODEL ROWS(SCAN)
When the panel comes up I get only the last row (that has the column set to
the value) displayed.
Who can help?
You must TBVCLEAR before TBSARG.


(change Arabic number to Roman numeral to email)
Ray, Ian
2006-12-13 10:01:30 UTC
Permalink
Bill,

Ditch the TBSCAN -- it's scrolling the table to the first matching row. You
don't need it -- the TBSARG is enough.

Ian

-----Original Message-----
From: ISPF discussion list [mailto:ISPF-***@listserv.nd.edu] On Behalf Of Bill
Sent: 12 December 2006 17:05
To: ISPF-***@listserv.nd.edu
Subject: TBSARG/TBSCAN/TBDISPL - what am I doing wrong?

List -

I've got a simple program where I want to display certain rows of a table if
a column contains a certain value. I do:

TBTOP

TBSARG

TBSCAN

TBDISPL

My panel has )MODEL ROWS(SCAN)


When the panel comes up I get only the last row (that has the column set to
the value) displayed.

Who can help?

Thanks,

Bill


This e-mail is only for the above addressees. It may contain confidential or privileged information.
If you are not an addressee you must not copy, distribute, disclose or use any of the information in
it or any attachments. If you have received it in error please notify the sender and delete it
immediately.


Lloyds TSB Bank plc. Registered office: 25 Gresham Street, London EC2V 7HN. Registered in
England and Wales, number 2065. Telephone: 020 7626 1500.
Lloyds TSB Scotland plc. Registered office: Henry Duncan House, 120 George Street, Edinburgh
EH2 4LH. Registered in Scotland, number 95237. Telephone: 0131 225 4555.
Cheltenham & Gloucester plc. Registered office: Barnett Way, Gloucester GL4 3RL. Registered in
England and Wales, number 2299428. Telephone: 01452 372372.


Lloyds TSB Bank plc, Lloyds TSB Scotland plc and Cheltenham & Gloucester plc are authorised
and regulated by the Financial Services Authority and are signatories to the Banking Codes.


Lloyds TSB Bank plc and Lloyds TSB Scotland plc represent only the Scottish Widows and Lloyds
TSB Marketing Group for life assurance, pensions and investment business.
Cheltenham & Gloucester plc acts as an introducer only for life assurance, pensions and
investment business.


Lloyds TSB Group plc. Registered office: Henry Duncan House, 120 George Street, Edinburgh
EH2 4LH. Registered in Scotland, number 95000. Telephone: 0131 225 4555.
Bill
2006-12-13 15:55:50 UTC
Permalink
Well - I did a little experimenting and I have more clues:

I did just the TBSARG then a TBGET and caused an abend.

I could tell from the dump that TBGET had retrieved the last record in the
table (the same one that was being displayed by TBDISPL)

So I must be doing the TBSARG incorrectly yes?

Bill
----- Original Message -----
From: "Ray, Ian" <***@LLOYDSTSB.CO.UK>
To: <ISPF-***@listserv.nd.edu>
Sent: Wednesday, December 13, 2006 1:32 AM
Subject: Re: TBSARG/TBSCAN/TBDISPL - what am I doing wrong?
Post by Ray, Ian
Bill,
Ditch the TBSCAN -- it's scrolling the table to the first matching row.
You
Post by Ray, Ian
don't need it -- the TBSARG is enough.
Ian
-----Original Message-----
Sent: 12 December 2006 17:05
Subject: TBSARG/TBSCAN/TBDISPL - what am I doing wrong?
List -
I've got a simple program where I want to display certain rows of a table if
TBTOP
TBSARG
TBSCAN
TBDISPL
My panel has )MODEL ROWS(SCAN)
When the panel comes up I get only the last row (that has the column set to
the value) displayed.
Who can help?
Thanks,
Bill
This e-mail is only for the above addressees. It may contain confidential
or privileged information.
Post by Ray, Ian
If you are not an addressee you must not copy, distribute, disclose or use
any of the information in
Post by Ray, Ian
it or any attachments. If you have received it in error please notify the
sender and delete it
Post by Ray, Ian
immediately.
Lloyds TSB Bank plc. Registered office: 25 Gresham Street, London EC2V 7HN. Registered in
England and Wales, number 2065. Telephone: 020 7626 1500.
Lloyds TSB Scotland plc. Registered office: Henry Duncan House, 120 George Street, Edinburgh
EH2 4LH. Registered in Scotland, number 95237. Telephone: 0131 225 4555.
Cheltenham & Gloucester plc. Registered office: Barnett Way, Gloucester
GL4 3RL. Registered in
Post by Ray, Ian
England and Wales, number 2299428. Telephone: 01452 372372.
Lloyds TSB Bank plc, Lloyds TSB Scotland plc and Cheltenham & Gloucester plc are authorised
and regulated by the Financial Services Authority and are signatories to the Banking Codes.
Lloyds TSB Bank plc and Lloyds TSB Scotland plc represent only the Scottish Widows and Lloyds
TSB Marketing Group for life assurance, pensions and investment business.
Cheltenham & Gloucester plc acts as an introducer only for life assurance, pensions and
investment business.
Lloyds TSB Group plc. Registered office: Henry Duncan House, 120 George Street, Edinburgh
EH2 4LH. Registered in Scotland, number 95000. Telephone: 0131 225 4555.
Ray, Ian
2006-12-13 16:19:12 UTC
Permalink
Hmm, can't see where TBGET comes into it.

TBTOP - TBVCLEAR - (set desired column value) - TBSARG - TBDISPL should give
desired results.

Ian

-----Original Message-----
From: ISPF discussion list [mailto:ISPF-***@listserv.nd.edu] On Behalf Of Bill
Sent: 13 December 2006 15:39
To: ISPF-***@listserv.nd.edu
Subject: Re: TBSARG/TBSCAN/TBDISPL - what am I doing wrong?

Well - I did a little experimenting and I have more clues:

I did just the TBSARG then a TBGET and caused an abend.

I could tell from the dump that TBGET had retrieved the last record in the
table (the same one that was being displayed by TBDISPL)

So I must be doing the TBSARG incorrectly yes?

Bill
----- Original Message -----
From: "Ray, Ian" <***@LLOYDSTSB.CO.UK>
To: <ISPF-***@listserv.nd.edu>
Sent: Wednesday, December 13, 2006 1:32 AM
Subject: Re: TBSARG/TBSCAN/TBDISPL - what am I doing wrong?
Post by Ray, Ian
Bill,
Ditch the TBSCAN -- it's scrolling the table to the first matching row.
You
Post by Ray, Ian
don't need it -- the TBSARG is enough.
Ian
-----Original Message-----
Bill
Post by Ray, Ian
Sent: 12 December 2006 17:05
Subject: TBSARG/TBSCAN/TBDISPL - what am I doing wrong?
List -
I've got a simple program where I want to display certain rows of a table
if
Post by Ray, Ian
TBTOP
TBSARG
TBSCAN
TBDISPL
My panel has )MODEL ROWS(SCAN)
When the panel comes up I get only the last row (that has the column set
to
Post by Ray, Ian
the value) displayed.
Who can help?
Thanks,
Bill
This e-mail is only for the above addressees. It may contain confidential
or privileged information.
Post by Ray, Ian
If you are not an addressee you must not copy, distribute, disclose or use
any of the information in
Post by Ray, Ian
it or any attachments. If you have received it in error please notify the
sender and delete it
Post by Ray, Ian
immediately.
Lloyds TSB Bank plc. Registered office: 25 Gresham Street, London EC2V
7HN. Registered in
Post by Ray, Ian
England and Wales, number 2065. Telephone: 020 7626 1500.
Lloyds TSB Scotland plc. Registered office: Henry Duncan House, 120
George Street, Edinburgh
Post by Ray, Ian
EH2 4LH. Registered in Scotland, number 95237. Telephone: 0131 225 4555.
Cheltenham & Gloucester plc. Registered office: Barnett Way, Gloucester
GL4 3RL. Registered in
Post by Ray, Ian
England and Wales, number 2299428. Telephone: 01452 372372.
Lloyds TSB Bank plc, Lloyds TSB Scotland plc and Cheltenham & Gloucester
plc are authorised
Post by Ray, Ian
and regulated by the Financial Services Authority and are signatories to
the Banking Codes.
Post by Ray, Ian
Lloyds TSB Bank plc and Lloyds TSB Scotland plc represent only the
Scottish Widows and Lloyds
Post by Ray, Ian
TSB Marketing Group for life assurance, pensions and investment business.
Cheltenham & Gloucester plc acts as an introducer only for life assurance,
pensions and
Post by Ray, Ian
investment business.
Lloyds TSB Group plc. Registered office: Henry Duncan House, 120 George
Street, Edinburgh
Post by Ray, Ian
EH2 4LH. Registered in Scotland, number 95000. Telephone: 0131 225 4555.
Bill
2006-12-13 18:08:28 UTC
Permalink
It should work and yet it doesn't - this is the problem I'm trying to solve.

I put the TBGET in to retrieve the current row for diagnostic purposes to
see which row the cursor would point to after the TBSARG.

I had originally put in a TBSCAN and TBGET after the TBSARG to set the
cursor to the first visible row so I could retrieve one of the columns to
use as an argument for another table. I've taken those out for diagnosing
this problem.

Bill

----- Original Message -----
From: "Ray, Ian" <***@LLOYDSTSB.CO.UK>
To: <ISPF-***@listserv.nd.edu>
Sent: Wednesday, December 13, 2006 7:57 AM
Subject: Re: TBSARG/TBSCAN/TBDISPL - what am I doing wrong?
Post by Ray, Ian
Hmm, can't see where TBGET comes into it.
TBTOP - TBVCLEAR - (set desired column value) - TBSARG - TBDISPL should give
desired results.
Ian
-----Original Message-----
Sent: 13 December 2006 15:39
Subject: Re: TBSARG/TBSCAN/TBDISPL - what am I doing wrong?
I did just the TBSARG then a TBGET and caused an abend.
I could tell from the dump that TBGET had retrieved the last record in the
table (the same one that was being displayed by TBDISPL)
So I must be doing the TBSARG incorrectly yes?
Bill
----- Original Message -----
Sent: Wednesday, December 13, 2006 1:32 AM
Subject: Re: TBSARG/TBSCAN/TBDISPL - what am I doing wrong?
Post by Ray, Ian
Bill,
Ditch the TBSCAN -- it's scrolling the table to the first matching row.
You
Post by Ray, Ian
don't need it -- the TBSARG is enough.
Ian
-----Original Message-----
Bill
Post by Ray, Ian
Sent: 12 December 2006 17:05
Subject: TBSARG/TBSCAN/TBDISPL - what am I doing wrong?
List -
I've got a simple program where I want to display certain rows of a table
if
Post by Ray, Ian
TBTOP
TBSARG
TBSCAN
TBDISPL
My panel has )MODEL ROWS(SCAN)
When the panel comes up I get only the last row (that has the column set
to
Post by Ray, Ian
the value) displayed.
Who can help?
Thanks,
Bill
This e-mail is only for the above addressees. It may contain confidential
or privileged information.
Post by Ray, Ian
If you are not an addressee you must not copy, distribute, disclose or use
any of the information in
Post by Ray, Ian
it or any attachments. If you have received it in error please notify the
sender and delete it
Post by Ray, Ian
immediately.
Lloyds TSB Bank plc. Registered office: 25 Gresham Street, London EC2V
7HN. Registered in
Post by Ray, Ian
England and Wales, number 2065. Telephone: 020 7626 1500.
Lloyds TSB Scotland plc. Registered office: Henry Duncan House, 120
George Street, Edinburgh
Post by Ray, Ian
EH2 4LH. Registered in Scotland, number 95237. Telephone: 0131 225 4555.
Cheltenham & Gloucester plc. Registered office: Barnett Way, Gloucester
GL4 3RL. Registered in
Post by Ray, Ian
England and Wales, number 2299428. Telephone: 01452 372372.
Lloyds TSB Bank plc, Lloyds TSB Scotland plc and Cheltenham & Gloucester
plc are authorised
Post by Ray, Ian
and regulated by the Financial Services Authority and are signatories to
the Banking Codes.
Post by Ray, Ian
Lloyds TSB Bank plc and Lloyds TSB Scotland plc represent only the
Scottish Widows and Lloyds
Post by Ray, Ian
TSB Marketing Group for life assurance, pensions and investment business.
Cheltenham & Gloucester plc acts as an introducer only for life assurance,
pensions and
Post by Ray, Ian
investment business.
Lloyds TSB Group plc. Registered office: Henry Duncan House, 120 George
Street, Edinburgh
Post by Ray, Ian
EH2 4LH. Registered in Scotland, number 95000. Telephone: 0131 225 4555.
Seibert, Dave
2006-12-13 19:00:32 UTC
Permalink
I have a couple suggestions for you.

1) Use the facilities of Dialog Test to try to isolate your problem.
On the ISPF main menu, unless it has been remove by a fastidious
soandso, the dialog test stuff is option 7. Note, if it has been
removed from the visible menu, try option 7 anyway, unless it has been
reassigned to another option. Sometimes I've seen it removed from the
menu, but still in the ZSEL structure and still work.
7.4 allows you to test many of the features of your table access. 7.1
allows you to issue most of the function calls.

2) use Doug Nadel's ISPVCALL facility to trace the ISPF occurrences.
Search the ISPF-L archives if you're not hip to Doug's facility. Who
knows, maybe it's even described in the official doc by now. Briefly,
you can a) issue the command, TSO ISPVCALL; b) cause your problem; c)
issue the command TSO ISPVCALL a 2nd time. The 2nd invocation takes you
into browse of the trace output. There is a lot of data there. If I
recall correctly, you can look for )MSG in column 1 to see highlights of
the problem occurrences. Look for better doc than I'm lazily providing.

good luck


Dave

-----Original Message-----
From: ISPF discussion list [mailto:ISPF-***@listserv.nd.edu] On Behalf Of
Bill
Sent: Wednesday, December 13, 2006 12:48 PM
To: ISPF-***@listserv.nd.edu
Subject: Re: TBSARG/TBSCAN/TBDISPL - what am I doing wrong?

It should work and yet it doesn't - this is the problem I'm trying to
solve.

I put the TBGET in to retrieve the current row for diagnostic purposes
to see which row the cursor would point to after the TBSARG.

I had originally put in a TBSCAN and TBGET after the TBSARG to set the
cursor to the first visible row so I could retrieve one of the columns
to use as an argument for another table. I've taken those out for
diagnosing this problem.

Bill
The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it.
Ray, Ian
2006-12-14 10:08:27 UTC
Permalink
Bill,

TBSARG simply sets a search argument; it does not change the CRP (current
row pointer) of the table. However, TBGET itself may do so. TBGET does not
necessarily retrieve the current row: it retrieves the row that matches the
current values of the key variables (assuming the table is keyed). A better
way to retrieve the current row is:

TBSKIP table-name NUMBER(0)

I think you are disturbing the status quo with your TBGET.

Ian



-----Original Message-----
From: ISPF discussion list [mailto:ISPF-***@listserv.nd.edu] On Behalf Of Bill
Sent: 13 December 2006 17:48
To: ISPF-***@listserv.nd.edu
Subject: Re: TBSARG/TBSCAN/TBDISPL - what am I doing wrong?

It should work and yet it doesn't - this is the problem I'm trying to solve.

I put the TBGET in to retrieve the current row for diagnostic purposes to
see which row the cursor would point to after the TBSARG.

I had originally put in a TBSCAN and TBGET after the TBSARG to set the
cursor to the first visible row so I could retrieve one of the columns to
use as an argument for another table. I've taken those out for diagnosing
this problem.

Bill

----- Original Message -----
From: "Ray, Ian" <***@LLOYDSTSB.CO.UK>
To: <ISPF-***@listserv.nd.edu>
Sent: Wednesday, December 13, 2006 7:57 AM
Subject: Re: TBSARG/TBSCAN/TBDISPL - what am I doing wrong?
Post by Ray, Ian
Hmm, can't see where TBGET comes into it.
TBTOP - TBVCLEAR - (set desired column value) - TBSARG - TBDISPL should
give
Post by Ray, Ian
desired results.
Ian
-----Original Message-----
Bill
Post by Ray, Ian
Sent: 13 December 2006 15:39
Subject: Re: TBSARG/TBSCAN/TBDISPL - what am I doing wrong?
I did just the TBSARG then a TBGET and caused an abend.
I could tell from the dump that TBGET had retrieved the last record in the
table (the same one that was being displayed by TBDISPL)
So I must be doing the TBSARG incorrectly yes?
Bill
----- Original Message -----
Sent: Wednesday, December 13, 2006 1:32 AM
Subject: Re: TBSARG/TBSCAN/TBDISPL - what am I doing wrong?
Post by Ray, Ian
Bill,
Ditch the TBSCAN -- it's scrolling the table to the first matching row.
You
Post by Ray, Ian
don't need it -- the TBSARG is enough.
Ian
-----Original Message-----
Bill
Post by Ray, Ian
Sent: 12 December 2006 17:05
Subject: TBSARG/TBSCAN/TBDISPL - what am I doing wrong?
List -
I've got a simple program where I want to display certain rows of a
table
Post by Ray, Ian
if
Post by Ray, Ian
TBTOP
TBSARG
TBSCAN
TBDISPL
My panel has )MODEL ROWS(SCAN)
When the panel comes up I get only the last row (that has the column set
to
Post by Ray, Ian
the value) displayed.
Who can help?
Thanks,
Bill
This e-mail is only for the above addressees. It may contain
confidential
Post by Ray, Ian
or privileged information.
Post by Ray, Ian
If you are not an addressee you must not copy, distribute, disclose or
use
Post by Ray, Ian
any of the information in
Post by Ray, Ian
it or any attachments. If you have received it in error please notify
the
Post by Ray, Ian
sender and delete it
Post by Ray, Ian
immediately.
Lloyds TSB Bank plc. Registered office: 25 Gresham Street, London EC2V
7HN. Registered in
Post by Ray, Ian
England and Wales, number 2065. Telephone: 020 7626 1500.
Lloyds TSB Scotland plc. Registered office: Henry Duncan House, 120
George Street, Edinburgh
Post by Ray, Ian
EH2 4LH. Registered in Scotland, number 95237. Telephone: 0131 225
4555.
Post by Ray, Ian
Post by Ray, Ian
Cheltenham & Gloucester plc. Registered office: Barnett Way, Gloucester
GL4 3RL. Registered in
Post by Ray, Ian
England and Wales, number 2299428. Telephone: 01452 372372.
Lloyds TSB Bank plc, Lloyds TSB Scotland plc and Cheltenham & Gloucester
plc are authorised
Post by Ray, Ian
and regulated by the Financial Services Authority and are signatories to
the Banking Codes.
Post by Ray, Ian
Lloyds TSB Bank plc and Lloyds TSB Scotland plc represent only the
Scottish Widows and Lloyds
Post by Ray, Ian
TSB Marketing Group for life assurance, pensions and investment
business.
Post by Ray, Ian
Post by Ray, Ian
Cheltenham & Gloucester plc acts as an introducer only for life
assurance,
Post by Ray, Ian
pensions and
Post by Ray, Ian
investment business.
Lloyds TSB Group plc. Registered office: Henry Duncan House, 120 George
Street, Edinburgh
Post by Ray, Ian
EH2 4LH. Registered in Scotland, number 95000. Telephone: 0131 225
4555.

Loading...