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 

Replacing values using SYNCSORT

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


Joined: 21 Apr 2004
Posts: 61
Topics: 33
Location: hyderabad

PostPosted: Wed Feb 04, 2009 11:57 am    Post subject: Replacing values using SYNCSORT Reply with quote

Hi,

Please provide solution for the following:

I've a file which contains the records as follows:
Code:

HDR  11111
1234 ABCD
TRLR 11111

The requirement is for HDR & TRLR 11111 is to be replaced with 22222. After replacing the values i've to copy entire file to output file.
The result should be as follows:
Code:

HDR  22222
1234 ABCD
TRLR 22222

Please let me know whether it can be possible with a single step using syncsort.
Please provide solution.

Thanks,
Kiran.
Back to top
View user's profile Send private message
Brian Wood
Beginner


Joined: 14 Jan 2009
Posts: 37
Topics: 0
Location: USA

PostPosted: Wed Feb 04, 2009 2:35 pm    Post subject: Reply with quote

kirank - try something like this:
Code:

//SYSIN  DD *
 INREC IFTHEN=(WHEN=(1,3,CH,EQ,C'HDR'),OVERLAY=(5:C'22222')),
       IFTHEN=(WHEN=(1,4,CH,EQ,C'TRLR'),OVERLAY=(6:C'22222'))
 SORT FIELDS=COPY

_________________
Brian Wood
SyncSort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Back to top
View user's profile Send private message Send e-mail
kirank
Beginner


Joined: 21 Apr 2004
Posts: 61
Topics: 33
Location: hyderabad

PostPosted: Thu Feb 05, 2009 11:41 am    Post subject: Reply with quote

Hi,

Thanks for the reply. I tried with the example given by you, but i'm getting error as Invalid Inrec. Please provide an alternative solution.


Thanks,
kirank.
Back to top
View user's profile Send private message
Brian Wood
Beginner


Joined: 14 Jan 2009
Posts: 37
Topics: 0
Location: USA

PostPosted: Thu Feb 05, 2009 1:10 pm    Post subject: Reply with quote

kirank: please contact me by email, zos_tech@syncsort.com. Please email me the SyncSort message output, including the banner listing (identifies the release you are using), control statements and all WERxxx messages. I tested the coding I provided using the latest relase, SyncSort for z/OS 1.3. I will do what I can to assist you.
_________________
Brian Wood
SyncSort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Back to top
View user's profile Send private message Send e-mail
kirank
Beginner


Joined: 21 Apr 2004
Posts: 61
Topics: 33
Location: hyderabad

PostPosted: Fri Feb 06, 2009 10:07 am    Post subject: Reply with quote

Hi Brian,

I'm really thankful to you for your support in providing solution.
Today i tried with the example given by you and i got the result exactly what i want.

Once again thank you very much.

Regards,
kirank.
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