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
 

 

COMMAND TO LEAVE SPACE AT A PARTICULAR COLUMN IN A DATA SET

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
barajendran1

New User


Joined: 16 Jun 2010
Posts: 9
Location: Chennai

PostPosted: Tue Nov 16, 2010 2:47 pm    Post subject: COMMAND TO LEAVE SPACE AT A PARTICULAR COLUMN IN A DATA SET
Reply with quote

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
View user's profile Send private message

GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Tue Nov 16, 2010 3:31 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Nov 16, 2010 8:44 pm    Post subject:
Reply with quote

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:
Code:
chg all p'=' ' ' 3


If this is not what you are looking for, please clarify.
Back to top
View user's profile Send private message
rammanu

New User


Joined: 11 Oct 2007
Posts: 5
Location: Chennai

PostPosted: Thu May 14, 2015 7:41 am    Post subject: Reply to: COMMAND TO LEAVE SPACE AT A PARTICULAR COLUMN IN A DATA SET
Reply with quote

I want to shift the data in column 3 to column 4 and put space in column 3
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8131
Location: East Dubuque, Illinois, USA

PostPosted: Thu May 14, 2015 8:25 am    Post subject:
Reply with quote

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
View user's profile Send private message
rammanu

New User


Joined: 11 Oct 2007
Posts: 5
Location: Chennai

PostPosted: Thu May 14, 2015 9:17 am    Post subject:
Reply with quote

Thank you..It worked :-)
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Thu May 14, 2015 6:50 pm    Post subject:
Reply with quote

After 4½ years of time travel. A solution has been found. icon_biggrin.gif
Back to top
View user's profile Send private message
rammanu

New User


Joined: 11 Oct 2007
Posts: 5
Location: Chennai

PostPosted: Thu May 14, 2015 6:58 pm    Post subject: Reply to: COMMAND TO LEAVE SPACE AT A PARTICULAR COLUMN IN A DATA SET
Reply with quote

Terry, I am not the owner of original post :-). I was searching for similar query and found this..
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Fri May 15, 2015 1:37 am    Post subject:
Reply with quote

I know. We like to kid about threads that are "resurrected" !
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 Command to find TMEMBER name for a TPIPE Siva NKK Kothamasu IMS DB/DC 0 Wed Aug 16, 2017 6:08 pm
This topic is locked: you cannot edit posts or make replies. rexx to create a tso command Bharath Vikraman CLIST & REXX 1 Tue Aug 08, 2017 3:32 pm
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm
No new posts Paasing symbolic parameter to instrea... Robert Sample JCL & VSAM 2 Thu Jul 27, 2017 1:22 pm
No new posts Passing data from REXX to C programme... chong.zhou CLIST & REXX 3 Wed Jul 26, 2017 9:11 pm


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