IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

comparing dates using SYNCSORT


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sagarnsydney

New User


Joined: 12 Dec 2008
Posts: 16
Location: sydney

PostPosted: Mon Feb 09, 2009 3:06 pm
Reply with quote

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
View user's profile Send private message
loverj24

New User


Joined: 05 Jul 2007
Posts: 16
Location: bangalore

PostPosted: Mon Feb 09, 2009 3:13 pm
Reply with quote

Hi,

Welcome to the forum.

Please provide the Starting position of the record and the length of the field.

Thanks.
Back to top
View user's profile Send private message
marcomosca

New User


Joined: 05 Feb 2009
Posts: 4
Location: Italy

PostPosted: Mon Feb 09, 2009 5:14 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Feb 09, 2009 10:06 pm
Reply with quote

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
View user's profile Send private message
sagarnsydney

New User


Joined: 12 Dec 2008
Posts: 16
Location: sydney

PostPosted: Tue Feb 10, 2009 10:30 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Feb 10, 2009 10:56 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Amount of days between two dates PL/I & Assembler 8
No new posts Comparing Header and Trailer. DFSORT/ICETOOL 7
No new posts Count Records with a crietaria in a f... DFSORT/ICETOOL 5
No new posts DFSORT/SYNCSORT/ICETOOL JCL & VSAM 8
Search our Forums:

Back to Top