Page 1 of 1

Sort syntax

PostPosted: Mon Dec 24, 2007 6:02 pm
by oksk
hi all,

please let me know is something wrong with the syntax.

INCLUDE COND=((1,2,PD,EQ,X'0000',OR,1,2,PD,EQ,X'FFFF'),OR,(166,5,CH,NE,C'CAUST',AND,166,5,CH,NE,C'MORTG',AND,166,5,CH,NE,C'HIREP'))

i'm getting syntax error.

Rgds,
oksk

Re: Sort syntax

PostPosted: Mon Dec 24, 2007 10:10 pm
by Frank Yaeger
There are a couple of problems with your INCLUDE statements.

They appear to overrun column 72 (although it's hard to tell since you didn't use code tags).

You're trying to use a PD field with a hexadecimal constant - that's not allowed. You can use a BI field with a hexadecimal constant, or a PD field with a numeric constant (e.g. +0). In your case, it looks like you should be using a BI field with a hex constant since you're not testing for a PD value.

This DFSORT INCLUDE statement will work:

  INCLUDE COND=((1,2,BI,EQ,X'0000',OR,1,2,BI,EQ,X'FFFF'),OR, 
    (166,5,CH,NE,C'CAUST',AND,                               
    166,5,CH,NE,C'MORTG',AND,                                 
    166,5,CH,NE,C'HIREP'))                                   

Re: Sort syntax

PostPosted: Wed Dec 26, 2007 4:42 pm
by oksk
Thanks a lot Frank!!!!