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
 
Inserting some chars in a column

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: Inserting some chars in a column
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: 1439
Location: Bangalore,India

PostPosted: Thu Jul 05, 2007 4:41 pm    Post subject:
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    Post subject:
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: 1439
Location: Bangalore,India

PostPosted: Thu Jul 05, 2007 5:14 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm
No new posts editting the file by inserting zeros ... pramodrsingh DFSORT/ICETOOL 9 Mon Aug 21, 2017 5:58 pm
No new posts Select numeric portion from CHAR data... balaji81_k DB2 6 Sat Aug 19, 2017 1:51 am
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm

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