|
Using DATE constants in SORT INCLUDE
SORT INCLUDE EXAMPLE 3 (DATE)
TASK : Get the records which has the date greater than current date.
Input file for SORT jcl
10 suresh 20000 01 20120203
20 NARENDRA 40000 06 20120925
30 jacob A 25000 07 20111018
40 RAMESH 34000 03 20120610
50 Kishore 50000 02 20120401
INCLUDE COND in SORT JCL
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(22,8,ZD,GT,DATE1P)
/*
Explanation - All inputs record wherever date is grater than current date, will be copied to outputfile
Assume current date is - 4-Apr-2012. Pls note input file the date with yyyymmdd format.
Output file from SORT JCL -
20 NARENDRA 40000 06 20120925
40 RAMESH 34000 03 20120610
******************************** Bottom of Data ****
|
|