View previous topic :: View next topic
|
Author |
Message |
abhishek mitra
New User
Joined: 24 Feb 2008 Posts: 48 Location: Kolkata
|
|
|
|
Hi,
In my file I have to date fields Like below -
Code: |
Start-Date______________End-date
(AN) (AN)
01/01/2004 31/12/2004
01/01/2005 31/12/2005
...
...
01/01/2011 31/12/2011 |
Code'd
All are alphanumeric data.
I want to get all the values between start-date 01/01/2006 and end-date 31/12/2010 using ICETOOL.
How can this be done? |
|
Back to top |
|
|
abhishek mitra
New User
Joined: 24 Feb 2008 Posts: 48 Location: Kolkata
|
|
|
|
abhishek mitra wrote: |
Hi,
In my file I have to date fields Like below -
Start-Date______________End-date
(AN) (AN)
01/01/2004_____________31/12/2004
01/01/2005_____________31/12/2005
...
...
01/01/2011_____________31/12/2011
All are alphanumeric data.
I want to get all the values between start-date 01/01/2006 and end-date 31/12/2010 using ICETOOL.
How can this be done? |
just edited the input for better visual presentation. |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
abhishek mitra,
Use the following DFSORT JCL . I assumed that your input is FB and lrecl of 80. You just need to re-arrange the dates in CCCYMMDD format and then use INCLUDE cond on outfil
Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
01/01/2004 31/12/2004 DROP
01/01/2005 31/12/2005 DROP
01/01/2006 31/12/2006 PICK
01/01/2007 31/12/2007 PICK
01/01/2008 31/12/2008 PICK
01/01/2009 31/12/2009 PICK
01/01/2010 31/12/2010 PICK
01/01/2011 31/12/2011 DROP
01/01/2012 31/12/2012 DROP
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INREC OVERLAY=(81:7,4,4,2,1,2,X,18,4,15,2,12,2)
OUTFIL BUILD=(1,80),
INCLUDE=(81,8,ZD,GE,20060101,AND,90,8,ZD,LE,20101231)
/* |
The output of this job is
Code: |
01/01/2006 31/12/2006 PICK
01/01/2007 31/12/2007 PICK
01/01/2008 31/12/2008 PICK
01/01/2009 31/12/2009 PICK
01/01/2010 31/12/2010 PICK
|
|
|
Back to top |
|
|
abhishek mitra
New User
Joined: 24 Feb 2008 Posts: 48 Location: Kolkata
|
|
|
|
Can you please put a few words explaining DROP and PICK? I haven't use it anyday. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hi,
I guess DROP and PICK are just indicators, to have a better viewing of output.
They are not statements or options.(Which I too thought were options initially )
Regards, |
|
Back to top |
|
|
abhishek mitra
New User
Joined: 24 Feb 2008 Posts: 48 Location: Kolkata
|
|
|
|
vasanthz wrote: |
Hi,
I guess DROP and PICK are just indicators, to have a better viewing of output.
They are not statements or options.(Which I too thought were options initially )
Regards, |
GR8
Thanks to both of you for your kind attention. |
|
Back to top |
|
|
|