MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Replace data with spaces

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
naveen
Beginner


Joined: 03 Dec 2002
Posts: 90
Topics: 31

PostPosted: Mon Jan 13, 2003 12:05 am    Post subject: Replace data with spaces Reply with quote

Consider this input file:

Code:
a1111 sfs hfsf yufss
b1111 sdf fshs ithfff
c1111 dfs dfsf ff
d2222 ews 222e 22222
e3333 dsd fsfs f


Now I want to insert SPACES in place of each entry in column 4 i.e. from position 16 onwards.i.e.
Code:
yufss
ithfff
ff
22222

should all be replaced by spaces.

How to do this ?
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12368
Topics: 75
Location: San Jose

PostPosted: Mon Jan 13, 2003 12:10 am    Post subject: Reply with quote

Naveen,

You can use outrec to get the desired results.

Code:

  SORT FIELDS=COPY
  OUTREC FIELDS=(1,15,            $ COPY FIRST 15 BYTES FROM INPUT   
                 6X,              $ PAD WITH 6 SPACES FOR COLUMN 4
                 22,n)            $ REST OF THE FIELDS (IF ANY)
/*


Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
naveen
Beginner


Joined: 03 Dec 2002
Posts: 90
Topics: 31

PostPosted: Tue Jan 21, 2003 12:10 am    Post subject: Reply with quote

Kolusu,
your solution is giving me Syntax Error.
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12368
Topics: 75
Location: San Jose

PostPosted: Tue Jan 21, 2003 12:41 am    Post subject: Reply with quote

Naveen,

Can you post the exact error message??

Thanks

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Tue Jan 21, 2003 11:03 am    Post subject: Reply with quote

Naveen,

I'm guessing you coded 22,n as shown. You have to replace n with an appropriate length. For example, if your input records are 80 bytes long and you want your output records to be 80 bytes long, you would use 22,59 (80 - 21 = 59).
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group