View previous topic :: View next topic
|
Author |
Message |
sagarnsydney
New User
Joined: 12 Dec 2008 Posts: 16 Location: sydney
|
|
|
|
Hi,
I have a below requirement.
I have date like 31DEC08
I have data as below in a file
30DEC08
12NOV08
11JAN09
13OCT08
13FEB09
30NOV08
31JAN09
14MAR09
I want to compare these values with 31DEC08 and extract only after 31DEC08...means my output should be as follows
11JAN09
31JAN09
13FEB09
14MAR09
Sagar |
|
Back to top |
|
|
loverj24
New User
Joined: 05 Jul 2007 Posts: 16 Location: bangalore
|
|
|
|
Hi,
Welcome to the forum.
Please provide the Starting position of the record and the length of the field.
Thanks. |
|
Back to top |
|
|
marcomosca
New User
Joined: 05 Feb 2009 Posts: 4 Location: Italy
|
|
|
|
Hello,
I'm new to the forum (maybe is not the right way to reply on a topic... but i try),
You should use an INCLUDE or OMIT statament (using DFSORT)
For example
SORT [your sort]
...
OMIT COND (6,2,CH,EQ,C'08')
or
INCLUDE COND (6,2,CH,NE,C'08')
where CH is the type of your field (you should see by yourself)
You could use also GT or LT (greater or Less)...
All this statements and the entire ICEMAN/DFSORT utilities are well explained on IBM "DFSORT Application Programming Guide" |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello Sagar and welcome to the forum,
Does your system use DFSORT or Syncsort?
Depending on which product you use, your topic might stay here in JCL or be relocated to the DFSORT part of the forum. |
|
Back to top |
|
|
sagarnsydney
New User
Joined: 12 Dec 2008 Posts: 16 Location: sydney
|
|
|
|
Hi All,
First of all thanks for your prompt responces.
The starting position 10 and number of characters is 7
I am using syncsort
sagar |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
How complete are the example dates?
What about dates before the year 2000?
Will the compare always be against Dec 31 of that year?
If the dates will always be greater than 2000 and the ddmmm will always be 31DEC, you could INCLUDE or OMIT based on the 2-character year. |
|
Back to top |
|
|
|