Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
How to insert space

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL
Author Message
itdsen

New User


Joined: 20 Sep 2006
Posts: 17
Location: Chennai

PostPosted: Fri Jun 13, 2008 5:27 pm    Post subject: How to insert space
Reply with quote

following is my input file

senthil
kumar



i wants o/p file as

s e n t h i l
k u m a r.

Give me a sample program.
Back to top
View user's profile Send private message
References
PostPosted: Fri Jun 13, 2008 5:27 pm    Post subject: Re: How to insert space Reply with quote

Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 498
Location: Richmond, Virginia

PostPosted: Fri Jun 13, 2008 5:38 pm    Post subject:
Reply with quote

Quote:
Give me.


That's very nice.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 985
Location: Virginia, USA

PostPosted: Fri Jun 13, 2008 5:39 pm    Post subject: Re: How to insert space
Reply with quote

itdsen wrote:
following is my input file

senthil
kumar



i wants o/p file as

s e n t h i l
k u m a r.

Give me a sample program.


Don't demand.

Simple loop with move and reference modification.

I shouldn't do this but here goes.

Code:
move spaces to target.
perform varying x from 1 by 1 until x > length of source
     move source (x : 1) to target ((x * 2) - 1 : 1)
end-perform
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 498
Location: Richmond, Virginia

PostPosted: Fri Jun 13, 2008 5:47 pm    Post subject:
Reply with quote

Craq - getting weak. Friday, right?
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 985
Location: Virginia, USA

PostPosted: Fri Jun 13, 2008 5:53 pm    Post subject:
Reply with quote

Phrzby Phil wrote:
Craq - getting weak. Friday, right?


Yes it's been a long week and I'm getting weak in my old age.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 Hours
Page 1 of 1