Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

reverse a string and write in another file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
mohnish

New User


Joined: 22 Sep 2006
Posts: 4

PostPosted: Tue May 08, 2007 12:12 pm    Post subject: reverse a string and write in another file
Reply with quote

hi..

how can we reverse a string present in file1 and write the reversed string in file2

like..

file1:

this is line 1
this is line 2
this is line 3

the requiremnet is to reverse each line and write the reversed line in file2
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue May 08, 2007 12:46 pm    Post subject:
Reply with quote

All is revealed in the REXX manual which is easily accessed by clicking right here http://ibmmainframes.com/manuals.php

It is the REVERSE command I believe
Back to top
View user's profile Send private message
bhim_s

New User


Joined: 19 Sep 2006
Posts: 46
Location: New Delhi

PostPosted: Wed May 16, 2007 3:51 pm    Post subject:
Reply with quote

Here is the example for U:

Code:
Message = "Happy birthday to you"
NewMsg = REVERSE(Message)
Say "The original message was " Message
Say "The new message is " NewMsg
Will display:
The original message was Happy birthday to you
The new message is uoy ot yadhtrib yppaH


Bhim
Back to top
View user's profile Send private message
pcoreddy

New User


Joined: 14 Mar 2007
Posts: 24
Location: Mysore

PostPosted: Wed May 16, 2007 5:42 pm    Post subject: Re: reverse a string and write in another file
Reply with quote

MOVE FUNCTION REVERSE(MY-VAR) TO MY-VAR

by using this one reverse it and then write the 2nd file
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Wed May 16, 2007 7:19 pm    Post subject:
Reply with quote

pcoreddy -

It seems like you confused REXX with COBOL...

o.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us