Panel doesn't execute )PNTS Section

294 views Asked by At

I'm coding a ISPF Panel with "Point and shoot" elements. The elements say "yes" and "no" and the default cursor have to point to "yes".

1st Case:
Declaration of the fields: + TYPE(INPUT) PAS(ON)
When I use this declaration, the panel closes by pressing [enter] and generating rc = 0. However, the )PNTS section doesn't run.

2nd CASE:
Declaration of the fields: + TYPE (PS)
The )PNTS section runs by pressing [enter]. However, I cannot set the .cursor to the field "yes".

I tryed different ways with different field names (e.g. ZPS00001). I tryed to simulate Point and Shoot with Rexx, but nothing worked really fine.

1

There are 1 answers

0
Marv Knight On BEST ANSWER

Pressing enter will cause the point and shoot fields to be processed. However the cursor must be on one of the fields for the )PNTS section to set the value associated with a field. It would sound like panel may have not been coded correctly. PAS should be used for input or output fields and PS should be used for text fields. For instance if you have the following panel:

)ATTR                                
 $ TYPE(PS)                          
 ! TYPE(OUTPUT)  PAS(ON)             
)BODY                                
+ --------------------- +            
+ ===>_ZCMD              +           
+                                    
$Field1  : _FLD   +                  
$Field2  : _ABC   +                  
$Field3  : !IN1   +                  
$Field4  : !IN2   +                  
)INIT                                
&INV1 = 111                          
&INV2 = 222                          
&INV3 = 333                          
)REINIT                              
REFRESH(*)                           
)PROC           
)PNTS                                    
FIELD(IN1) VAR(INV1) VAL(ON)             
FIELD(IN2) VAR(INV2) VAL(OFF)            
FIELD(ZPS00001) VAR(INV3) VAL(1)         
FIELD(ZPS00002) VAR(INV3) VAL(2)         
FIELD(ZPS00003) VAR(INV3) VAL(3)         
FIELD(ZPS00004) VAR(INV3) VAL(4)         
)END                                     

With the following REXX exec:

/* REXX */                                  
RCC = 0                                     
INV1 = 0                                    
INV2 = 1                                    
DO WHILE RCC = 0                            
   ADDRESS ISPEXEC 'DISPLAY PANEL(PAS)'     
   RCC = RC                                 
   SAY INV1 '-' INV2 '-' INV3               
END                                         

You can test the values of inv1, inv2 and inv3 based on where you put the cursor when you hit enter. You will get 1, 2, 3 or 4 if the cursor in on field1, field2, field3 or field4. If it is on IN1 or IN2 then you get ON or OFF. It all depends on where the cursor is positioned when ENTER is hit. Based on the example you can see point and shoot is not limited to Menus. Hope the example helps.

Marv Knight