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

Select records of prior month from the file


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
madishpa

New User


Joined: 18 May 2007
Posts: 28
Location: Hyderabad

PostPosted: Fri Jun 28, 2013 1:59 am
Reply with quote

Hello All,

Select records of prior month from the file

Input file:

01xxxxxxxxxx
02xxxxxxxxxx
06xxxxxxxxxx
05xxxxxxxxxx
05VVVVVVVVV

Output file:

05xxxxxxxxxX
05VVVVVVVVV

What date function in DFSORT is to be applied to select prior month records.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Jun 28, 2013 2:01 am
Reply with quote

As with your other question, what do you want to use for the "current month"? Is it the same at one minute past midnight on the first of the months?
Back to top
View user's profile Send private message
madishpa

New User


Joined: 18 May 2007
Posts: 28
Location: Hyderabad

PostPosted: Fri Jun 28, 2013 2:30 am
Reply with quote

I am primarly looking for the date function which selects records of particular month.
I have seen date functions thru which we can apply selection criteria on YYYYMMDD, YYYY, MMDDYY and other many formats.
I don't know how to apply selection criteria on only month field.
Can some one help me on this.
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: Fri Jun 28, 2013 3:55 am
Reply with quote

Hello,

Suggest you post some sample input data (maybe only the date field(s) and the output you want when your process is run.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri Jun 28, 2013 10:03 pm
Reply with quote

madishpa wrote:
I am primarly looking for the date function which selects records of particular month.
I have seen date functions thru which we can apply selection criteria on YYYYMMDD, YYYY, MMDDYY and other many formats.
I don't know how to apply selection criteria on only month field.
Can some one help me on this.


madishpa,

You just cannot apply only the MONTH as selection criteria when selecting records from prior month. You would need the year also. For example if the current month is January you need the records from December of last Year. So you need to have the year along with date.

use DATE2-1 which will give you last month date as CCYYMM. You can use this date in INCLUDE/OMIT condition
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top