Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Enlist the features of rexx as a programming language.

1029


Can I combine uni-REXX with a compiled language in my application? What application programming interfaces are available? For example, can I share variables between uni-REXX and a compiled language?

900


why is there no os/2 (ecs) port of oorexx?

998


how to pass parms to ispf edit macro?

1099


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.

2369


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?

899


How to code the db2 queries using rexx, and also plz send some link and examples using db2 queries?

916


how to access data in control blocks such as jobname?

952


Is it possible to combine uni-rexx with a compiled language in any application? What applications interfaces are there?

923


does uni-rexx give me any capabilities designed specifically for the unix environment?

975


can I port my existing applications from the mainframe or os/2? Will there be extensive changes required to do this?

976


i want new rexx tool which will perform jcl chk without submitting it

2085


What does the sample library of uni-rexx consist of?

1064


what would I use uni-rexx for?

951


How to run my rexx exec?

917