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 |
What are the various error conditions seen in rexx?
What is the difference between ooRexx and IBM's Object REXX for Windows?
how to access data held on the jes spool?
Is it possible to port existing applications from the mainframe or os/2? Are there major changes required to do this?
Suppose I want to code a rexx program in order to get the inputfile and output files of jcl. I want code snippet or the coding for this?
how to pass parms to ispf edit macro?
have you already used rexx - even for limited purposes? Do you need to maintain a high level of productivity during your transition to unix?
i want to code a rexx program in order to get the inputfile and output files of jcl. i want code snippet or the coding for this , please
Is it possible to combine uni-rexx with a compiled language in any application? What applications interfaces are there?
I have one input file and some 40 tables, I want to read input file and compare the input file value with the table value if it is present then we have to update with new value, this should be repeated for all 40 tables and we are reading only one input file, for this is there any REXX program or job or routine to accomplish above requirement. components of the requirements; 1. One input file 2. 40 DB2 tables 3. we have to read from the input file and compare with table value, if present then update with new value (this should be recurssive for all 40 tables for every record of input file). 4. quick help is appreciated.
When will a port of ooRexx to "XYZ" be available?
How do I Run My Rexx Exec.?