View previous topic :: View next topic
|
Author |
Message |
barajendran1
New User
Joined: 16 Jun 2010 Posts: 9 Location: Chennai
|
|
|
|
Can anyone please help me by telling a command to leave space at 3rd column of a data set which contains more than 11000 records.
3rd column of that data set has different characters.
While searching for this I came to know about the OO - Overlay command, but with this command I can insert a character at the end of the record. |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
a row has columns = fields
one column has positions
if you want a space on position 3 of a certain column :
Code: |
substr(col,1,2) !! ' ' !! substr(col,4) |
!! is concat operator here, could be that you have to use || or concat() function
or
Code: |
overlay(ctransa,' ', 3,1,octets) |
i'm not going to explain OCTETS,CODEUNITS16,CODEUNITS32 |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Suspecting that this is an editor question, i've moved this topic to the tso/clist part of the forum.
Had you posted in this part of the forum originally youprobably would have received an editor answer hours ago. . .
Do you want to destroy the current content or shift the data?
If so, use:
If this is not what you are looking for, please clarify. |
|
Back to top |
|
|
rammanu
New User
Joined: 11 Oct 2007 Posts: 5 Location: Chennai
|
|
|
|
I want to shift the data in column 3 to column 4 and put space in column 3 |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
I want to shift the data in column 3 to column 4 and put space in column 3 |
Since you posted in the TSO/ISPF section of the forum, the assumption will be you want a TSO solution (instead of a SORT solution or something else). Investigate the BNDS primary command and the right shift line commands in TSO/ISPF Edit. |
|
Back to top |
|
|
rammanu
New User
Joined: 11 Oct 2007 Posts: 5 Location: Chennai
|
|
|
|
Thank you..It worked :-) |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
After 4½ years of time travel. A solution has been found. |
|
Back to top |
|
|
rammanu
New User
Joined: 11 Oct 2007 Posts: 5 Location: Chennai
|
|
|
|
Terry, I am not the owner of original post :-). I was searching for similar query and found this.. |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
I know. We like to kid about threads that are "resurrected" ! |
|
Back to top |
|
|
|