Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

comparing dates using SYNCSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: comparing dates using SYNCSORT
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    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Mon Feb 09, 2009 10:06 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Tue Feb 10, 2009 10:56 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 7 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us