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 DD DUMMY & CPU TIME Nileshkul Testing & Performance analysis 16 Mon Dec 19, 2016 11:35 pm
This topic is locked: you cannot edit posts or make replies. Get a job submitted itself every time... arunsoods JCL & VSAM 3 Tue Nov 22, 2016 4:05 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm


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