Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 8630
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
No new posts COB2 file processing rizwanaccy COBOL Programming 8 Tue Jan 02, 2018 1:00 pm
No new posts KSDS and Index file in cobol deepak14450 COBOL Programming 9 Fri Dec 22, 2017 9:36 am
No new posts Preserve order in Input File pshongal DFSORT/ICETOOL 13 Thu Dec 21, 2017 4:20 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us