How to read muiltple selected records in scroll able panel



TSO Programming, ISPF, SDF, SDSF and PDF, FTP, TCP/IP Concepts, SNA & SNA/IP etc...

How to read muiltple selected records in scroll able panel

Postby zingysayal1985 » Sun Mar 20, 2016 8:05 pm

Hi All,
Please find my requirment below.

1.Displays rows in the ISPF panel from the table using TBDISPL command.
2.Allows user to select any number of rows displayed in the panel. When the user presses 'enter' key, the selected rows should be copied in an ARRAY.
3.Allows user to scroll up/down to select rows in the next pages.

Problem statement :
I am able to select rows from the ISPF table displayed in the panel but when i am trying to read the selected rows ; it is able to ready only the first record and next other
records are not getting read in the Rexx program.
zingysayal1985
 
Posts: 8
Joined: Sun Mar 20, 2016 7:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to read muiltple selected records in scroll able pan

Postby zingysayal1985 » Sun Mar 20, 2016 8:55 pm

Code details :
! TYPE(INPUT) INTENS(HIGH) CAPS(ON ) JUST(LEFT ) PAD('_')    
# TYPE (NT)                                                  
% TYPE (TEXT)                                                
_ TYPE (OUTPUT) COLOR(BLUE)                                  
$ TYPE (NEF)                                                  
)BODY CMD(PCMD)                                              
%COMMAND===> $PCMD                                            
#SE        DETAILS             #                              
#------------------------------#                              
)MODEL                                                        
!Z _PDATA                   #                                
)INIT                                                        
 .ZVARS = 'SE'                                                
 .CURSOR= SE                                                  
)REINIT                                                      
  REFRESH(*)                                                  
 .CURSOR=&CURS                                                
)PROC                                                        
  &ROW = .CSRROW                                              
 IF (&ZTDSELS ¬=0000)                                        
 VER (&SE,LIST,S,B,M,R,V)                                    
  &ROW = .CSRROW                                              
  IF (&ROW NE 0)                                              
  IF (&SE = &Z)                                              
      &SE = S                                                
 

Rexx code:

DO WHILE ZTDSELS > 0                        
 SAY ZTDSELS                                
SE = STRIP(SE)                              
UPPER SE                                    
UPPER CNF                                    
SAY CNF                                      
 "CONTROL DISPLAY SAVE"                      
 IF SE ='S' THEN                            
 DO                                          
 SAY PDATA                                  
/*"TBSKIP" PDATA    "ROW("ZTDSELS")" */      
 END                                        
 "ISPEXEC TBDISPL"PDATA                      
 ZTDSELS = ZTDSELS - 1                      
 IF ZTDSELS = 1 THEN ZTDSELS = 0            
 IF RC = 8 THEN LEAVE                        
 "CONTROL DISPLAY RESTORE"                  
END


CODE' d
zingysayal1985
 
Posts: 8
Joined: Sun Mar 20, 2016 7:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to read muiltple selected records in scroll able pan

Postby Pedro » Mon Mar 21, 2016 9:45 pm

There are no comments in the code!

The key thing is that you have to issue TBDISPL service without specifying the panel name. It will retrieve the next row selected.
Pedro Vera
User avatar
Pedro
 
Posts: 684
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: How to read muiltple selected records in scroll able pan

Postby zingysayal1985 » Tue Mar 22, 2016 4:23 am

Many Thanks Pedro. Its working fine now.
zingysayal1985
 
Posts: 8
Joined: Sun Mar 20, 2016 7:45 pm
Has thanked: 0 time
Been thanked: 0 time


Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post