Page 1 of 1

Date comparision

PostPosted: Wed Nov 15, 2017 12:59 pm
by krishnaraj6eee
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?

Re: Date comparision

PostPosted: Wed Nov 15, 2017 11:47 pm
by NicC
The manual?
Manual in one hand, keyboard in other.

Re: Date comparision

PostPosted: Thu Nov 16, 2017 11:53 am
by krishnaraj6eee
I did tried in manual.. not able find anything about using Y2W with delimiter(/)

Re: Date comparision

PostPosted: Fri Feb 09, 2018 11:45 pm
by Aki88
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')
/*