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...
zingysayal1985
Posts: 8
Joined: Sun Mar 20, 2016 7:45 pm
Skillset: JCL,COBOL,REXX,ISPF,DB2,CICS
Referer: Internet

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
Skillset: JCL,COBOL,REXX,ISPF,DB2,CICS
Referer: Internet

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

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

Code details :

Code: Select all

! 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:

Code: Select all

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

User avatar
Pedro
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Skillset: ISPF
Referer: google
Location: Silicon Valley

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

zingysayal1985
Posts: 8
Joined: Sun Mar 20, 2016 7:45 pm
Skillset: JCL,COBOL,REXX,ISPF,DB2,CICS
Referer: Internet

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.


  • Similar Topics
    Replies
    Views
    Last post