If there are a set of statements and each has a
word "value" in it, If I want to display all these
statements so that the word "value" is aligned, then how do
I code this in REXX.
e.g - The value of X is Y.
Wot is its value?
Do u know its value?
I want to know its value.
Answer / sumanth toom
/**REXX**/
ADDRESS TSO
"ALLOC DD(INP1) DA('input-dataset') SHR REUS"
"EXECIO * DISKR INP1 (STEM IN1. FINIS"
MAX_OFFSET = 0
INP_OFFSET = 0
DO I = 1 TO IN1.0
PARSE UPPER VAR IN1.I INP
INP_OFFSET = POS("VALUE",INP)
IF INP_OFFSET > MAX_OFFSET THEN
DO
MAX_OFFSET = INP_OFFSET
END
END
DO I = 1 TO IN1.0
PARSE UPPER VAR IN1.I INP
Z = POS("VALUE",INP)
SAY LEFT(SUBSTR(IN1.I,1,(Z - 1)),(MAX_OFFSET - 1))||,
SUBSTR(IN1.I,Z,20)
END
"FREE DD(INP1)"
| Is This Answer Correct ? | 6 Yes | 0 No |
If I have limited experience with Rexx or it's been a long time since I've used it, what kind of help is available to get me started?
how long does the install of oorexx take?
How do I find or access the current level of a GDG?
How do I access data in control blocks such as jobname?
is there an aix version of oorexx?
How do I Run My Rexx Exec.?
I am new to rexx db2 ,can anyone help me by expalinin how to code the db2 queries using rexx,and also plz send some link and examples using db2 queries.
What is the use of uni-rexx?
I executed one job and I forget to save the final JCL. But took an XDC from SPOOL. Now I want to recover the JCL from XDC dataset. Is there any process to do this?. (Manually it takes a lot of time). Is there
How to run my rexx exec?
What are the functions available in rexx?
How do I access data held on the JES spool?