View previous topic :: View next topic
|
Author |
Message |
abhijit.nayak01
Active User
Joined: 22 Mar 2009 Posts: 161 Location: South Africa
|
|
|
|
hi,
suppose my file structure is
abcd1
pqrs2
wxyz3
and i need to compare the 5th character(i.e. 1,2,3 etc) of the file with some variable then how can i do it in REXX. |
|
Back to top |
|
|
Ronald Burr
Active User
Joined: 22 Oct 2009 Posts: 293 Location: U.S.A.
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
/code snippet on
Code: |
Address TSO "EXECIO * DISKR <ddname> (FINIS STEM rec."
do i = 1 to rec.0
if substr(rec.i,5,1) = <somechar> then do
/* ... */
/* ... do some processing related to condition TRUE */
/* ... */
end
else do
/* ... */
/* ... do some processing related to condition FALSE */
/* ... */
end |
/code snippet off |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
To summarize, you need to study the rexx reference manual and search for the following topics:
EXECIO
SUBSTR
stem variables |
|
Back to top |
|
|
|