IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Finding the position of last character in a JCL line by REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
seenivasakan
Currently Banned

New User


Joined: 13 May 2007
Posts: 13
Location: Karnataka

PostPosted: Wed Sep 26, 2007 3:13 pm
Reply with quote

Hi all,

i have a requirement to find the position of last character in a particular JCL. Using LASTPOS function in REXX we can able to find the lastposition of the known character.

Ex: // MGMTCLAS=M35D06M,STORCLAS=SBTACH
// DISP=SHR

For the above two lines the last character position is different. i am intrested to know how to find the Last Character Position?

Please share your ideas.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed Sep 26, 2007 3:21 pm
Reply with quote

for the solution to be simple You must assume that the statement contains no comment after the parameters...

something like

Code:

tmp = strip(stmt,"T"," ")
pos  = lenght(tmp)


if the line contain comments a forward parsing is needed

regards

e.s
Back to top
View user's profile Send private message
seenivasakan
Currently Banned

New User


Joined: 13 May 2007
Posts: 13
Location: Karnataka

PostPosted: Wed Sep 26, 2007 7:19 pm
Reply with quote

Thanks enrico-sorichetti


Thanks for giving a direction to solve the problem.


Regards
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top