IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Inserting some chars in a column


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Amit Manas Dubey
Currently Banned

New User


Joined: 15 Dec 2006
Posts: 22
Location: Mumbai

PostPosted: Thu Jul 05, 2007 4:36 pm
Reply with quote

I have a Sequential file with LRECL 87. I have multiple records in the file with length 85 and the last two chars are spaces.

I want to insert some chars in Column 14 and 15 and shift the rest of the record to the right.

Any ideas how I can achieve that ?

Are there any Line commands that can be used ?

Best regards,
Amit.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Thu Jul 05, 2007 4:41 pm
Reply with quote

Amit,

Quote:
I have multiple records in the file with length 85 and the last two chars are spaces.

Does this mean, you have records with length 87 also. Also provide examples for better understanding.
Back to top
View user's profile Send private message
Amit Manas Dubey
Currently Banned

New User


Joined: 15 Dec 2006
Posts: 22
Location: Mumbai

PostPosted: Thu Jul 05, 2007 5:05 pm
Reply with quote

Hi

Yes the records have length 87, but the last 2 chars are spaces. So I can insert 2 chars in Column 14, 15 and shift the rest of the record to the right.

As an example say, i have a file with LRECL 10. And 1 sample record is

'ABCD1223 '

Now I inset 2 chars in column 3/4, and change the record to

'AB#@CD1223'

I want to achieve this for all the records in the file.

Regards,
Amit.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Thu Jul 05, 2007 5:14 pm
Reply with quote

Amit,

If are allowed to use DFSORT in your shop, use the following -

Code:
//SYSIN    DD    *       
  OPTION COPY           
  OUTREC FIELDS=(1,13,   
                 C'  ', 
                 14,72)   
/*                 


Note: I assumed all the IP records have space at 86 and 87 columns.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Thu Jul 05, 2007 6:41 pm
Reply with quote

If you want to use ISPF, try this:

On cmd line: bnd 14 87
In the margin for first rec: ))2
In the margin for last rec: ))
On cmd line: bnd

Then put what you want into 14-15.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts How to load to DB2 with column level ... DB2 6
No new posts RC query -Time column CA Products 3
No new posts first column truncated in search result IBM Tools 13
No new posts Split a record with data in a differe... DFSORT/ICETOOL 8
Search our Forums:

Back to Top