View previous topic :: View next topic
|
Author |
Message |
Amit Manas Dubey Currently Banned New User
Joined: 15 Dec 2006 Posts: 22 Location: Mumbai
|
|
|
|
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 |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
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 |
|
|
Amit Manas Dubey Currently Banned New User
Joined: 15 Dec 2006 Posts: 22 Location: Mumbai
|
|
|
|
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 |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
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 |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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 |
|
|
|