×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

ISPF PANEL and REXX that "SELECT" several items from PANEL

ISPF PANEL and REXX that "SELECT" several items from PANEL

ISPF PANEL and REXX that "SELECT" several items from PANEL

(OP)
Need help with ISPF PANEL and REXX that "SELECT" several items from PANEL..    How do I access the values for variable &Y (input from user). User can SELECT several items. Also VER on &Y is not working. I am new to ")model" and ISPF TABLES. Most of the code below I found in examples via GOOGLe search.
)ATTR DEFAULT(%+_)
{ TYPE(INPUT) INTENS(HIGH) CAPS(ON) JUST(LEFT) HILITE(USCORE)
$ TYPE(OUTPUT) INTENS(LOW )
)BODY EXPAND(;;)
%Command ===>_zcmd
)MODEL
{Y+$ename + $essn       +POSITION:$posn          +EXTENSION:$extn+
)END
)Init
&amt = csr
&row = NULL
)PROC               
VER (&y,LIST,S,T)    
if (&ztdsels = 0000)
    &row = .csrrow
    if (&row NE 0)
        if (&y   = ' '    
            &y   = 'NULL'
if (&ztdsels NE 0000)
    &row = 'NULL'     
)END
/* REXX PROGRAM TO SHOW EMPLOYEE INFORMATION ON A FULL SCREEN */  
TRACE OFF            
TABLE_NAME  = EMPS   
MULT_SELS = 0        
CRP = 2              
ROWCRP = 0           
"ALLOC DSN(DATA) DDN(EMPS) SHR"        
"EXECIO * DISKR EMPS (STEM E. FINIS"   
ISPEXEC "TBCREATE EMPS NOWRITE NAMES(ENAME, ESSN, POSN, EXTN)"
DO I=1 TO E.0                  
  ENAME = SUBSTR(E.I,1,25)     
  ESSN = SUBSTR(E.I,26,11)     
  POSN = SUBSTR(E.I,37,14)     
  EXTN = SUBSTR(E.I,51,4)      
  ISPEXEC "TBADD EMPS"         
END I                          
  CALL DISP          
SAY 'ROW' ROW        
 SAY 'SEL=' Y        
CRP = ZTDTOP         
SAY CRP              
MULT_SELS = ZTDSELS  

IF ROW <> NULL THEN                     
IF ROW > 0 THEN DO                      
"TBTOP" TABLE_NAME                      
"TBSKIP" TABLE_NAME "NUMBER("ROW")"     
END                                     
IF T_RC > 7 THEN DO                     
"TBEND" TABLE_NAME                      
RETURN                                  
END                                     
SHARFIND = NULL                         
TRACE OFF                               
ISPEXEC "TBCLOSE" TABLE_NAME                               
EXIT                                                       
DISP:                                                      
/*ISPEXEC "TBDISPL EMPS PANEL(TXNEMPMD)" */                
DO FOREVER                                                 
SHARFIND = "PASSTHRU"                                      
Y   = NULL                                                 
ROW = NULL                                                 
IF MULT_SELS = 0 THEN DO                                   
ISPEXEC           "TBTOP" TABLE_NAME                       
ISPEXEC           "TBSKIP" TABLE_NAME "NUMBER("CRP") "     
ISPEXEC           "TBDISPL" TABLE_NAME "PANEL(TXNEMPMD)" ,
                  "CSRROW("ROWCRP") AUTOSEL(NO)"           
END                                                        
ELSE                                                       
ISPEXEC       "TBDISPL" TABLE_NAME                         
T_RC = RC                                                  
RETURN   

RE: ISPF PANEL and REXX that "SELECT" several items from PANEL


Learning ISPF technique "from the manuals" is really the hard way.

Let me suggest that you hop on over to http://home.roadrunner.com/~mvsrexx/REXX/ and get a copy of ALIST, load it up and run it.    It will give you lots of (working) examples of how to deal with simple tables.

ALIST as it appears there is missing a chunk of boilerplate code which you can snip out of REXXSKEL and insert where it's needed in ALIST.

Good luck.
 

Frank Clarke
--America's source for adverse opinions since 1943.

RE: ISPF PANEL and REXX that "SELECT" several items from PANEL

The )PROC section of a panel is processed after the users presses [Enter].  Since variable &Y is part of the dynamic section (after the MODEL) you can't do a VER() on it. It doesn't have the ability to process multiple rows.  ISPF can verify only one value at a time in the static section.

The first TBDISPL will return the value of &Y to your rexx which you can then reference ie. IF Y = "1" THEN DO ...

If multiple rows were given values then you need to do subsequent TBDISPL without the PANEL() parm to get the values of the next row.  Check the return code to determine if there are more values.  The ISPF Dialog Developers guide gives these value.

Using TBDISPL with an ISPF panel is tricky and requires a lot of practice.  Good luck.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close