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: 3109
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: 2275
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 All times are GMT + 6 Hours
Forum Index -> SYNCSORT

 


Similar Topics
Topic Forum Replies
No new posts To Unstring spaces in a field COBOL Programming 3
No new posts Write record twice based on condition... SYNCSORT 7
No new posts Help required to reset decimal points... DFSORT/ICETOOL 10
No new posts Create a FTP record with help of SYNC... SYNCSORT 3
No new posts SYNCSORT-DB2 interface SYNCSORT 1
Search our Forums:


Back to Top