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

SYCNCSort Change Command


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
elijarajesh.mf
Warnings : 1

New User


Joined: 02 Feb 2010
Posts: 14
Location: hyderabad

PostPosted: Tue Dec 28, 2010 2:02 pm
Reply with quote

Hi,

My input file is having lenght of 40 bytes. Now I would like to know how to
change the values starting form the coloumn 31 based on the coloumn starting from 20,6(position and length).

Here is the example
Input file:
A 202LS372A LSA 202 SPRGA 202 TAMINA TX
A 202LS372A LSE 033 SPRGA 202 TAMINA TX

As per the above file in the second record if the value is E 033 (postion 20)I want to change TAMINA TX to CALIFORNIA TX.

Please let me know how to write this in SYNCSORT.


Thanks,
Rajesh.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Tue Dec 28, 2010 5:47 pm
Reply with quote

The field positions you mentioned do not seem to match with that of the sample data.
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Tue Dec 28, 2010 6:18 pm
Reply with quote

I'd use FINDREP

;)
Back to top
View user's profile Send private message
elijarajesh.mf
Warnings : 1

New User


Joined: 02 Feb 2010
Posts: 14
Location: hyderabad

PostPosted: Tue Dec 28, 2010 6:29 pm
Reply with quote

Thank you
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Dec 29, 2010 7:04 pm
Reply with quote

So the problem solved? You didnot tell about the release of SyncSort you are at - however, just for the record, Support for FINDREP was included in SyncSort for z/OS 1.3.2.
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Wed Dec 29, 2010 10:59 pm
Reply with quote

Based on the actual sample data provided, here is one way to accomplish this task:
Code:
//SORT1 EXEC PGM=SORT                                                 
//SORTIN  DD *                                                       
A 202LS372A LSA 202 SPRGA 202 TAMINA TX                               
A 202LS372A LSE 033 SPRGA 202 TAMINA TX                               
//SORTOUT DD SYSOUT=*                                                 
//SYSOUT  DD SYSOUT=*                                                 
//SYSIN   DD *                                                       
 INREC IFTHEN=(WHEN=(17,3,CH,EQ,C'033'),OVERLAY=(31:C'CALIFORNIA TX'))
 SORT FIELDS=COPY                                                     
/*                                                                   

The output produced is as follows:
Code:
A 202LS372A LSA 202 SPRGA 202 TAMINA TX   
A 202LS372A LSE 033 SPRGA 202 CALIFORNIA TX


Regards,
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Binary File format getting change whi... All Other Mainframe Topics 7
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
No new posts LTJ command CA Products 4
Search our Forums:

Back to Top