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 

want to replace records from certain postion

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


Joined: 29 May 2007
Posts: 165
Topics: 77

PostPosted: Fri Aug 17, 2007 9:33 am    Post subject: want to replace records from certain postion Reply with quote

Hi ,

I want to replace records from certain postion.
All the records have diifferent values in certain postion let say from 21st postion.

Suppose i have 5 records and all the five records have different values in 21st postion and now i want to change all the records from 21st postion to 30 postion to same values.

is there any way in sort we can do this.

lets take example
.......................21st
.......................mastercard.................
.......................visacard......................
.......................dinersclub....................
.......................barclays.......................
.......................suntrust........................

now i want

........................21 postion.......................
........................Amexcard......................
........................Amexcard......................
........................Amexcard......................
........................Amexcard......................
........................Amexcard......................

can any one help me

Thanks & regards,
Siva
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Fri Aug 17, 2007 10:24 am    Post subject: Reply with quote

Quote:

Suppose i have 5 records and all the five records have different values in 21st postion and now i want to change all the records from 21st postion to 30 postion to same values.


what if they are NOT different ? or a combo or 2 visa card and 3 of master card?

or any combo except being unique . what do you want to do in the scenario?

also what's up with 5 records? Do we need to treat every 5 records as 1 set?

What is the lrecl and recfm of the input and output files?

Kolusu
_________________
Kolusu
www.linkedin.com/in/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: Fri Aug 17, 2007 10:49 am    Post subject: Reply with quote

Kolusu,

I think Siva just wants to change positions 21-30 in every record regardless of what's there, and just wasn't too clear about it.

Siva,

Here's a DFSORT job to do that:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  OPTION COPY
  INREC OVERLAY=(21:C'Amexcard  ')
/*


If that's not what you want, then please explain clearly what you do want.
_________________
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
sivafdms
Intermediate


Joined: 29 May 2007
Posts: 165
Topics: 77

PostPosted: Sat Aug 18, 2007 12:06 pm    Post subject: Reply with quote

Hi Frank..

I have to test the code.It looks this might work..
Thanks for ur help..

Thanks,
Siva
Back to top
View user's profile Send private message
sivafdms
Intermediate


Joined: 29 May 2007
Posts: 165
Topics: 77

PostPosted: Wed Aug 22, 2007 12:52 am    Post subject: Reply with quote

Thanks Frank..


It worked ...
Once again thanks for ur help


Regards,
Siva
Back to top
View user's profile Send private message
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