Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

REXX: Absolute Position in PARSE

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
kvssbhaskar

New User


Joined: 27 Feb 2004
Posts: 2

PostPosted: Fri Aug 08, 2008 12:27 am    Post subject: REXX: Absolute Position in PARSE
Reply with quote

Hi

I am new to REXX and while going through initial document available I came across an example for Absolute Position in PARSE which is not clear to me. Can someone help me to understand

MYSTR=" WE HAVE MET THE ENEMY, AND HE IS US. "
PARSE VAR MYSTR V1 =10 V2 V3 V4 17 V5 =25 V6 1 V7 V8

Output is something like this
V1 > " WE HAVE "
V2 > "MET"
V3 > "TH"
V4 > ""
V5 > "E ENEMY,"
V6 > " AND HE IS US. "
V7 > "WE"
V8 > "HAVE MET THE ENEMY, AND HE IS US. "

I can understand how V1, V2 got the value, but confusion is with V3 and V4,V5 value.

Can some help me how these values are assigned.

Thanks
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10255
Location: italy

PostPosted: Fri Aug 08, 2008 1:02 am    Post subject: Reply to: Help me with the logic
Reply with quote

did You look at?
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2038
Location: Silicon Valley

PostPosted: Fri Aug 08, 2008 1:39 am    Post subject: Reply to: REXX: Absolute Position in PARSE
Reply with quote

Quote:
Output is something like this

I did not get the same results as you. You will not get good answers if your examples are not correct.

Using '=10' will cause a break at the column, not on a word boundary.

And if you use something like '=10 v3 =18', it will cause it to include spaces within the variable.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Running an REXX EXEC implicitly sho7hills CLIST & REXX 3 Thu Apr 20, 2017 8:14 am
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us