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
 

 

Date/time conditions

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
defields9

New User


Joined: 25 Mar 2006
Posts: 4

PostPosted: Sat Mar 25, 2006 1:28 am    Post subject: Date/time conditions
Reply with quote

What happened to my earlier question?
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Sat Mar 25, 2006 1:46 am    Post subject:
Reply with quote

What earlier question? This board got hacked this morning, so maybe some questions were lost. Post it again.
Back to top
View user's profile Send private message
defields9

New User


Joined: 25 Mar 2006
Posts: 4

PostPosted: Sat Mar 25, 2006 3:37 am    Post subject:
Reply with quote

I need to sort a syslog data set by date and time.

Suggestions on how to use the combined date and time stamp to create a less than equal to/greater than equal to file?

For example:

From date = 06080
from time = 17:30
To date = 06078
to time = 15:00

No problem with the date, but with the time combined sort finds no matching records.

Suggestions?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Sat Mar 25, 2006 4:16 am    Post subject:
Reply with quote

Quote:
I need to sort a syslog data set by date and time.

Suggestions on how to use the combined date and time stamp to create a less than equal to/greater than equal to file?


The first sentence makes it sound like you want to SORT on the date and time. The second sentence makes it sound like you want to INCLUDE on the date and time. I'm guessing it's INCLUDE you really want to do ... right?

Quote:
No problem with the date, but with the time combined sort finds no matching records.


Please show the control statements you used. Is the date a character string (C'yyddd' as shown) or is it in some other format? If another format, what does it look like? Is the time a character string C'mm:dd' as shown or is it in some other format? If another format, what does it look like.

What is the starting position, length and format of the date? What is the starting position, length and format of the time? What is the RECFM and LRECL of your input file?

Your To date is lower than your From date. Did you mean to show it that way?
Back to top
View user's profile Send private message
defields9

New User


Joined: 25 Mar 2006
Posts: 4

PostPosted: Sat Mar 25, 2006 4:21 am    Post subject:
Reply with quote

I'm using:

INCLUDE COND=(((20,5,CH,GE,C'FMDAT',AND,
26,2,CH,GE,C'FH',AND,
29,2,CH,GE,C'FM'),AND,
(20,5,CH,LE,C'TODAT',AND,
26,2,CH,LE,C'TH',AND,
29,2,CH,LE,C'TM')))

The date format is yyddd.

As you can see, yes I do want to include the appropriate date and times.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Sat Mar 25, 2006 5:15 am    Post subject:
Reply with quote

It would have been nice if you'd actually answered my questions. Since you didn't, I'll have to guess what you want. All of those conditions ANDed together are NOT going to work because they'd all have to be true individually to include a record, and that's not what you want.

Based on what I could figure out from what you said, I think the following DFSORT job will do what you want. I've assumed your input file has RECFM=FB. I've supplied my own input records to show how it works:

Code:

//S1 EXEC PGM=SORT
//SYSOUT    DD SYSOUT=*
//SORTIN    DD *
     NO            06077 15:00
     NO            06077 16:05
     NO            06078 14:59
---> FROM          06078 15:00
     YES           06078 15:01
     YES           06078 22:05
     YES           06079 00:30
     YES           06080 00:30
     YES           06080 17:29
---> TO            06080 17:30
     NO            06080 17:31
     NO            06080 18:01
/*
//SORTOUT DD SYSOUT=*
//SYSIN     DD *
  OPTION COPY
  INCLUDE COND=(20,11,CH,GE,C'06078 15:00',AND,
                20,11,CH,LE,C'06080 17:30')
/*


When I run this DFSORT job, SORTOUT has:

Code:

---> FROM          06078 15:00     
     YES           06078 15:01     
     YES           06078 22:05     
     YES           06079 00:30     
     YES           06080 00:30     
     YES           06080 17:29     
---> TO            06080 17:30     


I think that's what you want ... right?
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts Overlay the system date Danielle.Filteau SYNCSORT 4 Fri Mar 03, 2017 1:16 am
No new posts Inserting records based on conditions vickey_dw DFSORT/ICETOOL 9 Wed Feb 22, 2017 1:33 pm
No new posts Checking Current date vickey_dw DFSORT/ICETOOL 1 Wed Feb 08, 2017 11:14 pm


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