Page 1 of 1

INCLUDE COND

PostPosted: Fri Jul 10, 2009 3:16 pm
by fanatik
Can you assist me in understanding this code:

INCLUDE COND=((1,6,CH,GT,C'200905'),
AND,
((133,1,CH,EQ,C'Q'),OR,(133,1,CH,EQ,C'C'))))

Re: INCLUDE COND

PostPosted: Fri Jul 10, 2009 5:09 pm
by expat
Please refer to the SORT documentation readily available from the DFSORT forum.

Re: INCLUDE COND

PostPosted: Fri Jul 10, 2009 6:20 pm
by fanatik
thnx will do.

Re: INCLUDE COND

PostPosted: Fri Jul 10, 2009 8:21 pm
by Frank Yaeger
It says to include the record if the value in positions 1-6 is greater than '200905', providing that position 133 has a 'Q' or a 'C'. Otherwise, omit the record.

Re: INCLUDE COND

PostPosted: Mon Jul 13, 2009 4:16 pm
by fanatik
Thnx Frank

with this code can I pass a date variable and test the date, and increment the date ?

Re: INCLUDE COND

PostPosted: Mon Jul 13, 2009 8:46 pm
by Frank Yaeger
You can use the current date or a future date or a past date with INCLUDE. For example, for today (yyyymm):

1,6,CH,GT,DATE2

For next month (yyyymm + 1 month)

1,6,CH,GT,DATE2+1

For last month (yyyymm - 1 month)

1,6,CH,GT,DATE2-1

If you're trying to do something else, you need to explain clearly exactly what you're trying to do.

Re: INCLUDE COND

PostPosted: Tue Jul 14, 2009 5:28 pm
by fanatik
Thnx

Thats exactly wat i needed and for incrementing the day I would use DATE1.

Perfect.

Re: INCLUDE COND

PostPosted: Tue Jul 14, 2009 8:14 pm
by Frank Yaeger
Yes. DATE1 is a yyyymmdd date. DATE1+n would add n days.

Re: INCLUDE COND

PostPosted: Wed Jul 15, 2009 12:31 pm
by fanatik
Thnx Frank.