Issue with REXX and ISPF panels



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

Issue with REXX and ISPF panels

Postby vlad » Mon Feb 11, 2013 4:30 am

Hello Mainframers,

I would like to ask you one question:

I’m trying to make one simple program using REXX and ISPF panels. This program is running fine except one think, when I’m in the first panel and select option 1 and press ENTER, it’s nothing happened. In the second time when I select option 1 and press ENTER the program redirect to the second panel.

Could you please advise me what to change in my program to reduce the double pressing ENTER to jump from panel 1 to panel 2.

Here is the code:

REXX program:
/* REXX */                                       
"ISPEXEC DISPLAY PANEL(TEST2)"             
PULL A                                       
IF A=1 THEN "ISPEXEC DISPLAY PANEL(TEST1)"   
ELSE                                         
SAY A                                         
EXIT


Panel1:
)ATTR DEFAULT(%+_)                                                 
@ TYPE(INPUT) INTENS(HIGH) CAPS(ON) JUST(LEFT )                     
` TYPE(TEXT) INTENS(HIGH) CAPS(OFF) JUST(ASIS ) COLOR(YELLOW)       
~ TYPE(TEXT) INTENS(HIGH) CAPS(OFF) JUST(ASIS ) COLOR(TURQ)         
% TYPE(TEXT) INTENS(HIGH)                                           
# TYPE(TEXT) INTENS(HIGH) COLOR(TURQ) HILITE(REVERSE)               
)BODY WINDOW(62,32)                                                 
                        #MDS POWER PROG!!!!!!                       
%COMMAND ===>@A                                                     
 ~PLEASE SELECT AN OPTION:                                         
~                                                                   
`1+ LIST DATASET ATTRIBUTES                                         
`2+ COMPRESS A PDS DATASET                                         
`3+ EDIT PDS DATASET ATTRIBUTES                                     
`4+ CREATE NEW PDS                                                 
`5+ COPY PDS AND ALL DIR. BLOCKS                                   
`6+ DELETE DATASET ON DASD AND TAPE                                 
`7+ GENERATION DATA GROUPS (GDG)                                   
`8+ GENERATION ALIAS                                               
`9+ EXIT                                                           
~                                                                   
ENTER                                                               
)INIT                                                               
)END                                                               


Panel2:
)ATTR                     
)BODY WINDOW(70,20)       
# test ==>           
! test ==>         
)END


Code'd
vlad
 
Posts: 2
Joined: Mon Feb 11, 2013 4:00 am
Has thanked: 0 time
Been thanked: 0 time

Re: Issue with REXX and ISPF panels

 

Re: Issue with REXX and ISPF panels

Postby MrSpock » Mon Feb 11, 2013 5:45 am

Get rid of the statement "PULL A" and then post a copy of the execution of your REXX exec with a trace on.
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times

Re: Issue with REXX and ISPF panels

Postby enrico-sorichetti » Mon Feb 11, 2013 6:04 am

it looks like You are trying to reinvent the wheel ...
any reason to duplicate functions already provided by vanilla ISPF ???
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Re: Issue with REXX and ISPF panels

Postby vlad » Mon Feb 11, 2013 7:48 am

Hello All,
I'm just a student in a Technical University. I'm curios about the IBM Mainframe technologies. I would like to develop myself as a Mainframe programer. I'm trying to make one simple example of REXX program with ISPF panels.

Now about ny question:
I removed the PULL function from the REXX program. Now my simple program is working fine.
About the execution of the REXX program with trace on, I'm searching how to do it.

Thank you very much MrSpock for you advice!
Thanks to All good luck!
vlad
 
Posts: 2
Joined: Mon Feb 11, 2013 4:00 am
Has thanked: 0 time
Been thanked: 0 time

Re: Issue with REXX and ISPF panels

Postby Pedro » Mon Feb 11, 2013 10:15 pm

The problem was not explained well...
1. the DISPLAY PANEL statement asks the user for input, using a full screen method.
2. the PULL statement asks the user for input, using a line mode method.

Since you ask the user for two times, the user is required to press Enter two times.
Pedro Vera
User avatar
Pedro
 
Posts: 569
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 39 times

Re: Issue with REXX and ISPF panels

Postby chgman7 » Wed Mar 27, 2013 12:14 am

There are multiple way to resolve this issue, but I would add a VPUT to the panel, to put "A" into the profile pool. Then in the REXX EXEC, a VGET can be used to retrieve "A" from the profile pool. Also, I favor variable names that describe the variable.
chgman7
 
Posts: 1
Joined: Tue Mar 26, 2013 11:58 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Issue with REXX and ISPF panels

Postby enrico-sorichetti » Wed Mar 27, 2013 12:45 am

panel1 should not be <displayed> using DISPLAY
since it is a <selection> panel a SELECT should be used
and each option should point to the appropriate REXX script

in this way ALL the PANEL navigation will be handled by ISPF itself
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times


Return to TSO & ISPF

 


  • Related topics
    Replies
    Views
    Last post