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
 

 

Select records of prior month from the file

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

New User


Joined: 18 May 2007
Posts: 27
Location: Hyderabad

PostPosted: Fri Jun 28, 2013 1:59 am    Post subject: Select records of prior month from the file
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Fri Jun 28, 2013 2:01 am    Post subject: Reply to: Select records of prior month from the file
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: 27
Location: Hyderabad

PostPosted: Fri Jun 28, 2013 2:30 am    Post subject: Reply to: Select records of prior month from the file
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

Site Director


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

PostPosted: Fri Jun 28, 2013 3:55 am    Post subject:
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    Post subject: Re: Reply to: Select records of prior month from the file
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    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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


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