MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Syncsort - Replacing Field Values - Error

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
marcovan
Beginner


Joined: 10 May 2006
Posts: 5
Topics: 3

PostPosted: Mon Nov 20, 2006 10:25 am    Post subject: Syncsort - Replacing Field Values - Error Reply with quote

Hello,

I am new to syncsort and trying to learn from the various examples on this excellent site.

We have a requirement to perform the following data manipulation.

If in position 1 we find 'ABC' then we want to chance the values in position 35 to 'XYZ'

My code is as follows:
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=(1,3,CH,EQ,C'ABC'),
OVERLAY=(35:C'XYZ'))

When I run my job it comes back and it says:

SORT FIELDS=COPY
INREC IFTHEN=(WHEN=(1,3,CH,EQ,C'101'),
*
OVERLAY=(35:C'20X'))
WER268A INREC STATEMENT : SYNTAX ERROR

I've tried OUTREC as well. Any help would be appreciated.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12398
Topics: 75
Location: San Jose

PostPosted: Mon Nov 20, 2006 10:51 am    Post subject: Reply with quote

marcovan,

You have a version of syncsort which does not support IFTHEN syntax. try this

Code:

//STEP0100 EXEC PGM=SORT                         
//SYSOUT    DD SYSOUT=*                           
//SORTIN    DD *                                 
ABC                                               
123                                               
DEF                                               
//SORTOUT   DD SYSOUT=*                           
//SYSIN     DD *                                 
 SORT FIELDS=COPY                                 
 OUTREC FIELDS=(01,34,                           
                35:01,03,CHANGE=(3,C'ABC',C'XYZ'),
                         NOMATCH=(35,03),         
                38,43)                             
/*                                               

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
marcovan
Beginner


Joined: 10 May 2006
Posts: 5
Topics: 3

PostPosted: Mon Nov 20, 2006 11:18 am    Post subject: Reply with quote

Thanks Kolusu!

That worked like a charm.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group