using pipe and stem variable



IBM's Command List programming language & Restructured Extended Executor

using pipe and stem variable

Postby Wally87 » Sat Aug 13, 2016 2:11 am

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                                                  
 
Wally87
 
Posts: 2
Joined: Sat Aug 13, 2016 2:02 am
Has thanked: 1 time
Been thanked: 0 time

Re: using pipe and stem variable

Postby enrico-sorichetti » Sat Aug 13, 2016 12:21 pm

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
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

These users thanked the author enrico-sorichetti for the post:
Wally87 (Mon Aug 15, 2016 6:06 pm)
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times

Re: using pipe and stem variable

Postby Wally87 » Mon Aug 15, 2016 6:07 pm

Indeed, thank you kind sir :)
Wally87
 
Posts: 2
Joined: Sat Aug 13, 2016 2:02 am
Has thanked: 1 time
Been thanked: 0 time


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post