Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 2 Sun Nov 06, 2016 8:11 pm
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am
No new posts Add system date inside of a PS file a... pramitdas DFSORT/ICETOOL 5 Sun Aug 28, 2016 12:06 am
No new posts Converting NULL column into NOT NULL ... Raghu navaikulam DB2 5 Sat Aug 06, 2016 3:45 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us