Date comparision



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Date comparision

Postby krishnaraj6eee » Wed Nov 15, 2017 12:59 pm

Hi all,

I want to compare a date field MM/DD/YY with the current date..
I'm not sure about how to use Y2W with a delimiter(/).. Any suggestions where i need to begin with?
krishnaraj6eee
 
Posts: 9
Joined: Tue Jan 17, 2017 1:36 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Date comparision

 

Re: Date comparision

Postby NicC » Wed Nov 15, 2017 11:47 pm

The manual?
Manual in one hand, keyboard in other.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2812
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 116 times

Re: Date comparision

Postby krishnaraj6eee » Thu Nov 16, 2017 11:53 am

I did tried in manual.. not able find anything about using Y2W with delimiter(/)
krishnaraj6eee
 
Posts: 9
Joined: Tue Jan 17, 2017 1:36 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Date comparision

Postby Aki88 » Fri Feb 09, 2018 11:45 pm

Hello,

Am fairly sure that this problem might've been resolved by now; in case it isn't, then, use INREC to first format your input date into Y2W format.
Rest is simple INCLUDE from that point; example:


//SORTIN   DD *                      
02/10/18                    <-- DATE IN MM/DD/YY FORMAT        
/*                                  
//SORTOUT  DD SYSOUT=*              
//SYSIN    DD *                      
 INREC BUILD=(1,2,4,2,7,2)          
 SORT FIELDS=COPY                    
 OUTFIL INCLUDE=(1,6,Y2W,EQ,Y'DATE1')
/*                                  
 
Aki88
 
Posts: 377
Joined: Tue Jan 28, 2014 1:52 pm
Has thanked: 33 times
Been thanked: 36 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post