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

Having a problem with the logic of my syncsort statements


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
emman

New User


Joined: 01 Jun 2006
Posts: 8

PostPosted: Thu Jul 13, 2006 6:57 pm
Reply with quote

Hi Guys,

I'm having a problem with the logic of my syncsort statements. On a certain input file, I' am evaluating 9 fields. First I want the first byte (a 2 byte field) equals to "50". Then, I am searching a certain value on the remaining 8 fields. And I want to pick up all record/s which has record type 50 and contain value on any of the remaining fields.

So this is my synsort parameter..

SORT FIELDS=COPY
INCLUDE COND=(1,2,CH,EQ,C'50',AND,
311,15,CH,EQ,C'OSUP2905 ',OR,
326,15,CH,EQ,C'OSUP2905 ',OR,
345,15,CH,EQ,C'OSUP2905 ',OR,
362,15,CH,EQ,C'OSUP2905 ',OR,
384,15,CH,EQ,C'OSUP2905 ',OR,
401,15,CH,EQ,C'OSUP2905 ',OR,
435,15,CH,EQ,C'OSUP2905 ',OR,
452,15,CH,EQ,C'OSUP2905 ')


"OSUP2905" is the value I am evaluating if exists on 8 fields., Hoe any one will help me. The output file is empty. thanks..
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Thu Jul 13, 2006 9:54 pm
Reply with quote

Try this:

Code:

SORT FIELDS=COPY
INCLUDE COND=((1,2,CH,EQ,C'50'),AND,
(311,15,CH,EQ,C'OSUP2905 ',OR,
 326,15,CH,EQ,C'OSUP2905 ',OR,
 345,15,CH,EQ,C'OSUP2905 ',OR,
 362,15,CH,EQ,C'OSUP2905 ',OR,
 384,15,CH,EQ,C'OSUP2905 ',OR,
 401,15,CH,EQ,C'OSUP2905 ',OR,
 435,15,CH,EQ,C'OSUP2905 ',OR,
 452,15,CH,EQ,C'OSUP2905 '))
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Thu Jul 13, 2006 10:07 pm
Reply with quote

Emman,

I also noticed you have a length of 15 on all your OR'ed statements and are only providing 9 positions of character data to check ('OSUP2905 ' is 9 positions), so try:

Code:

SORT FIELDS=COPY
INCLUDE COND=((1,2,CH,EQ,C'50'),AND,
(311,9,CH,EQ,C'OSUP2905 ',OR,
326,9,CH,EQ,C'OSUP2905 ',OR,
345,9,CH,EQ,C'OSUP2905 ',OR,
362,9,CH,EQ,C'OSUP2905 ',OR,
384,9,CH,EQ,C'OSUP2905 ',OR,
401,9,CH,EQ,C'OSUP2905 ',OR,
435,9,CH,EQ,C'OSUP2905 ',OR,
452,9,CH,EQ,C'OSUP2905 '))
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts z/vm installation problem All Other Mainframe Topics 0
No new posts Finding faulty logic Subscript out of... COBOL Programming 5
Search our Forums:

Back to Top