Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Only Last Record getting displayed in panel

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
anshul_gugnani

New User


Joined: 02 Nov 2009
Posts: 73
Location: Mumbai

PostPosted: Thu Apr 28, 2011 4:53 pm    Post subject: Only Last Record getting displayed in panel
Reply with quote

Hi,

I have created a REXX to open a PS dataset and display the records in a panel. I do not want the record to be the key for the table. My problem is am getting only the last record of file displayed multiple times on panel.

Heris is the part of REXX where I am creating table and adding records -
Code:

"ISPEXEC TBCREATE OUTDATA NAMES (&REC) NOWRITE"               
DO I = 1 TO RECD.0                                             
   REC = STRIP(RECD.I,'T')                                     
   "ISPEXEC TBADD OUTDATA"                                     
   "ISPEXEC TBBOTTOM OUTDATA"                                   
END                                                           
"ISPEXEC TBTOP OUTDATA"                                       
DO FOREVER                                                                                       
  "ISPEXEC TBDISPL OUTDATA PANEL(PANEL3)"                       
  LC = RC                                                       
  IF LC \= 0 THEN LEAVE                                           
END                                                           
"ISPEXEC TBEND OUTDATA"


And Here is is my panel
Code:
)Attr                                                                   
@ Type(Output) Intens(HIGH)                                             
)BODY EXPAND (\\)                                                       
---------------------------------------------------------------------- 
                      RELEASE SCHEDULE                                 
---------------------------------------------------------------------- 
%COMMAND ======> _CMD                                %SCROLL===_SAMT+   
+                                                                       
+                                                                       
%              RLS DATE      FROM DATE     TO DATE                     
%              ----------    ----------    ----------                   
)MODEL                                                                 
@REC                                                                   +
)INIT                                                                   
&PFKEY2 = ' '                                                           
&SAMT=CSR                                                               
)PROC                                                                   
 &PFKEY=.PFKEY                                                         
)END                                                                   


Can Anyone pleae suggest why only last record is getting displayed instead of all records of file. thanks for your help.
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Apr 28, 2011 5:03 pm    Post subject:
Reply with quote

if you are not going to run the clist thru trace,
you could at least check return-codes on all your service calls.
Back to top
View user's profile Send private message
anshul_gugnani

New User


Joined: 02 Nov 2009
Posts: 73
Location: Mumbai

PostPosted: Thu Apr 28, 2011 5:06 pm    Post subject:
Reply with quote

Hi,

I run the trace and found that all the records were being read from file and added in table but for TBDISPL it only displays the last record the no of times there are records in file.

Could you please suggest where am in going wrong.

Thanks.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Thu Apr 28, 2011 5:16 pm    Post subject:
Reply with quote

  1. Why are you invoking the TBBOTTOM service?
  2. Why are you overlaying REC instead of parsing the record into the table variables?
  3. Shouldn't you be checking LC rather than L to determine whether to leave your DO FOREVER loop?
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 641
Location: Whitby, ON, Canada

PostPosted: Thu Apr 28, 2011 5:17 pm    Post subject:
Reply with quote

You should also learn to use ISPF Dialog Test.

BTW your LIBDEF and ADDPOP do not need to be inside your DO FOREVER loop.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Thu Apr 28, 2011 5:34 pm    Post subject: Reply to: Only Last Record getting displayed in panel
Reply with quote

This makes the difference, changing '&REC' to just 'REC':

Code:

"ISPEXEC TBCREATE OUTDATA NAMES(REC) NOWRITE"    <<===           
DO I = 1 TO RECD.0                                             
   REC = STRIP(RECD.I,'T')                                     
   "ISPEXEC TBADD OUTDATA"                         
END                                                           
"ISPEXEC TBTOP OUTDATA"                                       
DO FOREVER                                                                                       
  "ISPEXEC TBDISPL OUTDATA PANEL(PANEL3)"                       
  LC = RC                                                       
  IF LC \= 0 THEN LEAVE                                           
END                                                           
"ISPEXEC TBEND OUTDATA"
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Thu Apr 28, 2011 7:51 pm    Post subject: Re: Reply to: Only Last Record getting displayed in panel
Reply with quote

superk wrote:
This makes the difference, changing '&REC' to just 'REC'

Hmmm. Perhaps the TS will deign to inform us whether she meant to create an ISPF table with one column named REC, or whether she meant to create a table with a variable number of columns whose names were held in the Rexx variable REC.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Thu Apr 28, 2011 9:02 pm    Post subject: Reply to: Only Last Record getting displayed in panel
Reply with quote

I haven't quite figured out what the point is of creating an ISPF Table just to display records from a dataset, something that EDIT/BROWSE/VIEW does better and easier? The way the panel's designed, there's nothing that the user can do with them anyway.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Apr 28, 2011 9:18 pm    Post subject:
Reply with quote

but it is a TOOL!.
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 645
Location: Pennsylvania

PostPosted: Thu Apr 28, 2011 9:35 pm    Post subject:
Reply with quote

superk,

I thought the same thing, until I had an occasion to use it.

I have a tso application written in REXX that displays a panel to take requests from the user.

The requests are written to a sequential file (which they have update to of course), which is processed by a batch job later in the day.

The application allows users to see what requests are pending. This process loads the data into a ispf table to be displayed.

This allows me to format the data which is strung together in the file for easy reading.

It also allows me to 'hide' the file name to deter the user from changing the data incorrectly. A resourceful user could of course figure out the file name if they so desired, but this is a rare user.
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Fri Apr 29, 2011 1:51 am    Post subject: Reply to: Only Last Record getting displayed in panel
Reply with quote

Quote:
The way the panel's designed, there's nothing that the user can do with them anyway.


I see it as a first draft. The next draft (or next project / class assignment / etc... ) will do something more powerful.
Back to top
View user's profile Send private message
Michael Jakob

New User


Joined: 13 Mar 2011
Posts: 17
Location: Switzerland

PostPosted: Fri May 06, 2011 8:08 am    Post subject: Recordnumber as key
Reply with quote

Have you tried to use the record number (I) as key?
"ISPEXEC TBCREATE OUTDATA KEYS(I) NAMES(REC) NOWRITE"
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 Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts sort with previous record anatol DFSORT/ICETOOL 9 Thu Oct 06, 2016 2:36 am
No new posts Get Record count in summary record fo... Atul Banke DFSORT/ICETOOL 21 Fri Sep 23, 2016 4:17 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us