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

Syncsort for field to field comparision


IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Deepti_R

New User


Joined: 07 Nov 2019
Posts: 3
Location: USA

PostPosted: Thu Nov 07, 2019 11:04 pm
Reply with quote

Hello everyone,
I'm trying to compare the values at different positions in the file and if the value matches then overlay. Instead of hard coding the value can I compare the values at the positions? If I hard code as

OUTREC IFTHEN=(WHEN=(6,6,CH,EQ,C'111111'),
OVERLAY=(40:C'999999')) then this works file

but instead of hardcoding 111111 if I mention I position then it gives error,

OUTREC IFTHEN=(WHEN=(6,6,CH,EQ,40,6) --- > INCLUDE/OMIT INVALID FORMAT
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3049
Location: NYC,USA

PostPosted: Fri Nov 08, 2019 12:18 am
Reply with quote

Try this.
Code:
OUTREC IFTHEN=(WHEN=(6,6,CH,EQ,40,6,CH),OVERLAY=(40:C'999999'))
Back to top
View user's profile Send private message
Deepti_R

New User


Joined: 07 Nov 2019
Posts: 3
Location: USA

PostPosted: Fri Nov 08, 2019 12:51 am
Reply with quote

Thanks, it worked..icon_smile.gif
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2012
Location: USA

PostPosted: Fri Nov 08, 2019 2:01 am
Reply with quote

Deepti_R wrote:
Hello everyone,
I'm trying to compare the values at different positions in the file and if the value matches then overlay. Instead of hard coding the value can I compare the values at the positions? If I hard code as

OUTREC IFTHEN=(WHEN=(6,6,CH,EQ,C'111111'),
OVERLAY=(40:C'999999')) then this works file

but instead of hardcoding 111111 if I mention I position then it gives error,

OUTREC IFTHEN=(WHEN=(6,6,CH,EQ,40,6) --- > INCLUDE/OMIT INVALID FORMAT


WHEN=(6,6,CH,EQ,40,6,CH)
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 -> SYNCSORT

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
No new posts S0C7 - Field getting overlayed COBOL Programming 2
Search our Forums:

Back to Top