Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 7314

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 Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 1 Wed Dec 06, 2017 1:50 am
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
No new posts Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm
No new posts unable to set RC = 4 when empty file migusd SYNCSORT 1 Tue Nov 21, 2017 1:21 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us