adesutherland / CMS-370-BREXX

VM/370 Port of BREXX
Other
7 stars 5 forks source link

PARSE EXTERNAL accidentally queries the stack #68

Open mgrossmann opened 3 years ago

mgrossmann commented 3 years ago

Hey together,

regarding to my discussion here I believe bREXX behaves incorrectly when executing the PARSE EXTERNAL statement.

I am trying to get input from the user, but I already have data on the stack. So PARSE PULL will use the data from the stack and will not prompt the user. This should be solved by PARSE EXTERNAL.

t bug exec

/* REXX */                              
PARSE EXTERNAL INPUT                           
SAY "GOT > "INPUT

/* TO PUT SOME DATA ON THE STACK */                               
'IDENTIFY ( LIFO'                           

PARSE EXTERNAL INPUT                           
SAY "GOT > "INPUT       

PARSE PULL NAME DUMMY
SAY "I'AM "NAME                        

with bREXX it looks like:

Ready;   
bug                                                                          
1st input                                                                    
GOT > 1st input                                                               
GOT > MAINT    AT DRNMIG1A VIA RSCS     17:06:11 03/19/21 GMT     FRIDAY      
2nd input                                                                    
I'AM 2nd                                                                     
Ready;      

but it should be like this:

Ready;                      
bug                         
1st input                   
GOT> 1st input               
2nd input                   
GOT> 2nd input               
I'AM MAINT                  
Ready;    
BobBolch commented 3 years ago

This is a bug. PARSE EXTERNAL needs to call recently added entry point @@RDDRCT via CMSdirectRead instead of @@RDTERM via CMSconsoleRead

BobBolch commented 3 years ago

Only the VM Community Edition has the CMS mod to make this work.