Page 1 of 1

using pipe and stem variable

PostPosted: Sat Aug 13, 2016 2:11 am
by Wally87
First off, I have borrowed snippets of code from various sources on our system. I don't totally know how this is working, but I need to PIPE "D R,L" and get the first line of ALL the outstanding replies. Then I will parse through them and pick out which ones I need.
Currently, we have 4 outstanding replies. The following code does return 4 lines, unfortunately it is the first line 4 times.
I'm sure this is an easy logic error. :D


'PIPE MVS D R,L | CORR 2 |SEP | CASEI LOC / R /  ',    
'| STEM A.'                                            
Do i = 1 to A.0                                        
wto A.1                                                                                          
end                                                    
Exit                                                  
 

Re: using pipe and stem variable

PostPosted: Sat Aug 13, 2016 12:21 pm
by enrico-sorichetti
You should have asked an optometrist rather than on a forum :mrgreen:

wto A.1

if You had written

wto A.i

You would have got Your 4 different lines

Re: using pipe and stem variable

PostPosted: Mon Aug 15, 2016 6:07 pm
by Wally87
Indeed, thank you kind sir :)