IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Replacing a particular column as Spaces


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ksathishkumar83

New User


Joined: 21 Nov 2006
Posts: 50
Location: India

PostPosted: Wed Apr 18, 2007 6:35 pm
Reply with quote

I have about 40,000 records in a file.The first five characters will be either CS001 or CS002 .If it is CS001 then i have to Replace the Columns 8 to 12 as Spaces. Help me in doing this...
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Apr 18, 2007 7:11 pm
Reply with quote

Are the records FB or VB, and which sort product do you use ?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Apr 18, 2007 9:21 pm
Reply with quote

ksathishkumar83,

Assuming your input file is FB, you can use a DFSORT job like this to do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB)
//SORTOUT DD DSN=...  output file (FB)
//SYSIN    DD    *
  OPTION COPY
  INREC IFTHEN=(WHEN=(1,5,CH,EQ,C'CS001'),OVERLAY=(8:5X))
/*


If your input file is VB, let me know and I'll show you how to handle that.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts How to load to DB2 with column level ... DB2 6
No new posts RC query -Time column CA Products 3
No new posts leading spaces can be removed in trai... DFSORT/ICETOOL 1
No new posts first column truncated in search result IBM Tools 13
Search our Forums:

Back to Top