Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Having a problem with the logic of my syncsort statements

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Having a problem with the logic of my syncsort statements
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    Post subject: Re: Having a problem with the logic of my syncsort statement
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    Post subject: Re: Having a problem with the logic of my syncsort statement
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 5 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us