Date Compare - 'DD.MM.YYYY' GE '25.01.2010'



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Date Compare - 'DD.MM.YYYY' GE '25.01.2010'

Postby Ewizard » Mon Feb 01, 2010 3:38 pm

I want to edit an existing SYNCSORT to compare an input date of format 'DD.MM.YYYY', position 95, with a constant date '25.01.2010'. If the input date is greater than the constant date then I want to include the record.

The existing SYNCSORT is as follows:
SORT FIELDS=COPY
OUTFIL FILES=S1,
INCLUDE=((8,2,CH,EQ,C'50',OR,
8,2,CH,EQ,C'60',OR,
8,2,CH,EQ,C'40'),AND,
(1,4,CH,NE,C'P7 ',OR,
1,4,CH,NE,C'U7 '))
OUTFIL FILES=S2,
OMIT=((8,2,CH,EQ,C'50',OR,
8,2,CH,EQ,C'60',OR,
8,2,CH,EQ,C'40'),AND,
(1,4,CH,NE,C'P7 ',OR,
1,4,CH,NE,C'U7 ',OR,
8,1,CH,EQ,C'A'))
END

I have had a look at date formats but only see input formats such as DDMMYY or YYMMDD, etc..


Can you help?

Regards,
Eddie.
Ewizard
 
Posts: 10
Joined: Fri Jan 29, 2010 9:41 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Date Compare - 'DD.MM.YYYY' GE '25.01.2010'

 

Re: Date Compare - 'DD.MM.YYYY' GE '25.01.2010'

Postby Thampy » Wed Feb 03, 2010 10:13 pm

I am not sure whether Syncsort has any date formats to compare dates other than the offset date support.

You can use character comparison to get the desired output. The SORT Jcl is given below

I am assuming the input file record length is 200

SORT FIELDS=COPY
OUTREC IFTHEN=(WHEN=INIT,OVERLAY=(210:101,4,214:98,2,216:95,2))
OUTFIL FILES=1,INCLUDE=(210,8,CH,GE,C'20100125'),BUILD=(1,200)
OUTFIL FILES=2,OMIT=(210,8,CH,GE,C'20100125'),BUILD=(1,200)

Note : I have included only the date check condition in the OUTFIL statement. The other conditions you have to include along with the date check condition.
Thampy
 
Posts: 35
Joined: Sat Sep 26, 2009 2:27 pm
Has thanked: 0 time
Been thanked: 3 times

Re: Date Compare - 'DD.MM.YYYY' GE '25.01.2010'

Postby Ewizard » Thu Feb 04, 2010 9:06 pm

Thanks Thampy.

Regards,
Eddie :D
Ewizard
 
Posts: 10
Joined: Fri Jan 29, 2010 9:41 pm
Has thanked: 0 time
Been thanked: 0 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post