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
 
How to insert space

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
itdsen

New User


Joined: 20 Sep 2006
Posts: 23
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

Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 967
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: 1512
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

Active Member


Joined: 31 Oct 2006
Posts: 967
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: 1512
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to insert a value on specific pos... Poha Eater DFSORT/ICETOOL 9 Sun Oct 01, 2017 3:04 am
No new posts The TS7720 is out of cache space. Rex Montemayor All Other Mainframe Topics 2 Mon Sep 25, 2017 7:18 am
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts VSAM Space Allocation mrgnndhmk JCL & VSAM 7 Sat Apr 22, 2017 12:42 am
This topic is locked: you cannot edit posts or make replies. Need help in estimating space of unlo... ashek15 IMS DB/DC 12 Fri Apr 07, 2017 5:11 am

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