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: 2567
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

Active Member


Joined: 29 Apr 2008
Posts: 924
Location: Maryland

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 Last day of the month via SYNCSORT. SYNCSORT 5
This topic is locked: you cannot edit posts or make replies. Passing a field name to COBOL program COBOL Programming 10
No new posts BMS map length field greater than zero CICS 3
No new posts Break a record into fields, each fiel... SYNCSORT 2
No new posts SYNCSORT Error - CONTROL FIELD BEYOND... SYNCSORT 10
Search our Forums:

Back to Top