IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Forcing processing of all table rows


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
David Eisenberg

New User


Joined: 15 Nov 2007
Posts: 39
Location: New York

PostPosted: Thu Mar 05, 2009 8:31 am
Reply with quote

Anyone,

I'm a panel language newbie. I'm attempting to make a small modification to a preexisting panel which processes a table. What I'm doing is simply to set one of the fields in the table row to blanks when certain conditions are true. The code works fine, but only on table rows which were modified by the user. I need the code to work unconditionally for every row in the table, whether it is visible on-screen at that moment or not, and whether the user modified a field in that row or not.

I did see a reference to "auto-selection" in the manual; I confess that I'm not even sure that's relevant (although it looks like it is).

I suspect that this is something quite simple, but I have no experience with ISPF tables. Can someone please point me in the right direction?

Thanks so much,

David
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Mar 05, 2009 11:46 am
Reply with quote

Indeed, this is a straight-forward task:
Code:
1. Start with openning the table (TBOPEN)
2. Then TBTOP to position the table at start.
3. Then first TBSKIP with NUMBER(1) to get the first record.
4. Initiate a loop (using DO)
    5. Update the record
    6. TBSKIP again, until RC \= 0
7. Exit the loop
8. Close/Save the table.


O.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Thu Mar 05, 2009 6:16 pm
Reply with quote

Quote:
What I'm doing is simply to set one of the fields in the table row to blanks when certain conditions are true. The code works fine, but only on table rows which were modified by the user.

It seems you are blanking the field in the )PROC section of the panel itself.
Am I right ?
What Ofer proposed should be done in the program, before the TBDISP command.
Back to top
View user's profile Send private message
David Eisenberg

New User


Joined: 15 Nov 2007
Posts: 39
Location: New York

PostPosted: Thu Mar 05, 2009 7:42 pm
Reply with quote

>It seems you are blanking the field in the )PROC section of the panel itself. Am I right ?<

You are absolutely right, and now I realize how much I don't know about this, and that I may have a problem. I don't have access to the program, only the panel. I only have the load module for the program, not the source.

The panel I'm modifying is part of a product we are using. I'm comfortable making modifications to the panel (and indeed, I think this is not uncommon), but any changes I make need to happen within the panel.

So yes, the few lines I added were to the )PROC section, and they do work, but only if a user modifies a field in the row. Is is possible, within the panel itself, to code the sort of loop that Ofer suggested? Or might there be another way to do what I need?

David
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Thu Mar 05, 2009 10:07 pm
Reply with quote

Can you work with the table offline? That is, is it a table that you can manipulate and save and then have the new row information available for the next user?

If so, you can use TBSTATS and TBQUERY to get information about the table size and table structure. Then write a program as O suggested to open the table and update each row.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Mar 05, 2009 11:11 pm
Reply with quote

You can invoke REXX/COBOL/any other language from within panel, using the PANEXIT statement.

O.
Back to top
View user's profile Send private message
David Eisenberg

New User


Joined: 15 Nov 2007
Posts: 39
Location: New York

PostPosted: Fri Mar 06, 2009 12:44 am
Reply with quote

Responding to the last couple of posts...

>Can you work with the table offline?<

No. I really need to do whatever I'm going to do in the foreground, as part of the transaction.

>You can invoke REXX/COBOL/any other language from within panel, using the PANEXIT statement.<

Ah... and if I do that, then I would implement Ofer's algorithm from earlier in this thread?

Is that the only way that I could accomplish this? It's not possible to do it inline within the panel?

David
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Fri Mar 06, 2009 12:55 am
Reply with quote

Please ignore my suggestion. I just recalled that PANEXIT (just like the newer *REXX statement) can't issue ISPF services. Sorry...
O.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top