View previous topic :: View next topic
|
Author |
Message |
rakesh.v18
New User
Joined: 14 Feb 2006 Posts: 7 Location: India
|
|
|
|
how can we reverse a string in cobol without using REVERSE function
as my compiler is not supporting REVERSE function |
|
Back to top |
|
|
sandeep1dimri
New User
Joined: 30 Oct 2006 Posts: 76
|
|
|
|
Hi You can use
Name=mainframe (let its length is 30)
namer
J=1
Perform reverse-para
varying i from 30 by -1
until i=0
Reversa-para
Move name(i:1) to namer(j:1)
j=j+1
And if require u can handle spaces too |
|
Back to top |
|
|
|