IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

reverse a string and write in another file


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Tue May 08, 2007 12:46 pm
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
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
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: 2358
Location: Israel

PostPosted: Wed May 16, 2007 7:19 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top