Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Forcing processing of all table rows

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: Forcing processing of all table rows
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: 2360
Location: Israel

PostPosted: Thu Mar 05, 2009 11:46 am    Post subject:
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: 1243
Location: Israel

PostPosted: Thu Mar 05, 2009 6:16 pm    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Thu Mar 05, 2009 10:07 pm    Post subject: Reply to: Forcing processing of all table rows
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: 2360
Location: Israel

PostPosted: Thu Mar 05, 2009 11:11 pm    Post subject:
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    Post subject: Reply to: Forcing processing of all table rows
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: 2360
Location: Israel

PostPosted: Fri Mar 06, 2009 12:55 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts Conditional highlighting of rows in I... packerm CLIST & REXX 2 Thu Sep 21, 2017 6:50 pm
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us