IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

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: 27
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: 7312
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: 27
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: 19251
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 All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts Inserting records into the empty segm... IMS DB/DC 0
No new posts COBOL VS SORT Utility for file format... COBOL Programming 6
No new posts How to find which file contains my se... DFSORT/ICETOOL 6
No new posts IGZ0035S THERE WAS AN UNSUCCESSFUL OP... COBOL Programming 3
No new posts Hex Value - vb file replace old date ... DFSORT/ICETOOL 14

Back to Top