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

for which platforms is uni-rexx available?

914


what if I need to have the same application running on multiple platforms, such as unix and the mainframe? Does that mean I have to maintain two separate sources?

858


What are the functions available in rexx?

876


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

916


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

2003


I want to open particular list of members inside pds.Let me know whether below code will work.if not tell me how it works INPUT='DDM.DATASET(AAA*)' X = OUTTRAP(MEMS.)

3138


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

869


is oorexx compatible with rexx?

901


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?

839


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?

845


can oorexx run normal rexx programs?

961


How to find or access the current level of a gdg?

780


How to run my rexx exec?

871


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

929


What is the difference between ooRexx and IBM's Object REXX for Windows?

1022