Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
SYCNCSort Change Command

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: SYCNCSort Change Command
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: 2285
Location: @my desk

PostPosted: Tue Dec 28, 2010 5:47 pm    Post subject:
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    Post subject:
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    Post subject:
Reply with quote

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

Senior Member


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

PostPosted: Wed Dec 29, 2010 7:04 pm    Post subject:
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: 500
Location: USA

PostPosted: Wed Dec 29, 2010 10:59 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm
No new posts MQ command in option 6 of ISPF! Vignesh Sid All Other Mainframe Topics 3 Tue Sep 26, 2017 6:01 pm
No new posts How to change a string containing the... chong.zhou TSO/ISPF 6 Tue Aug 29, 2017 4:54 pm
No new posts Failure after DIR command Hank Watson All Other Mainframe Topics 2 Tue Aug 29, 2017 3:14 am
No new posts Command to find TMEMBER name for a TPIPE Siva NKK Kothamasu IMS DB/DC 0 Wed Aug 16, 2017 6:08 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us