| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| kirank Beginner
 
 
 Joined: 21 Apr 2004
 Posts: 61
 Topics: 33
 Location: hyderabad
 
 | 
			
				|  Posted: Wed Feb 04, 2009 11:57 am    Post subject: Replacing values using SYNCSORT |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| Brian Wood Beginner
 
 
 Joined: 14 Jan 2009
 Posts: 37
 Topics: 0
 Location: USA
 
 | 
			
				|  Posted: Wed Feb 04, 2009 2:35 pm    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| kirank Beginner
 
 
 Joined: 21 Apr 2004
 Posts: 61
 Topics: 33
 Location: hyderabad
 
 | 
			
				|  Posted: Thu Feb 05, 2009 11:41 am    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| Brian Wood Beginner
 
 
 Joined: 14 Jan 2009
 Posts: 37
 Topics: 0
 Location: USA
 
 | 
			
				|  Posted: Thu Feb 05, 2009 1:10 pm    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		| kirank Beginner
 
 
 Joined: 21 Apr 2004
 Posts: 61
 Topics: 33
 Location: hyderabad
 
 | 
			
				|  Posted: Fri Feb 06, 2009 10:07 am    Post subject: |   |  
				| 
 |  
				| 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 |  | 
	
		|  | 
	
		|  | 
	
		|  |