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: 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
No new posts line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am

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