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

How to filter out the data by YYMM(year and mon using DFSORT


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

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Tue Jul 15, 2014 4:26 pm
Reply with quote

In my Input file i have Multiple months data ,, How ever i want to copy all the records from Only previous month. I.e If iam running job on July , i want to copy all the records only belowngs to June..


MY input File has like bwlow..

140428
140429
140505
140505
140507
140527
140604
140604
140609
140609
140609
140610

Output if iam running on july :

140604
140604
140609
140609
140609
140610

I have tried using Below card ,

SORT FIELDS=COPY
INCLUDE COND=(32,4,CH,EQ,Y'DATE2'-1)
But It is not copying any 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: Tue Jul 15, 2014 4:53 pm
Reply with quote

DATE2 is YYYYMM. So if you compare that with a four-byte field, you are just comparing the YYYY part, so are unlikely to get the result you want.

YY dates are sooooooooo last century. Do you only have YY dates?
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Tue Jul 15, 2014 4:56 pm
Reply with quote

Issue is resolved now.....

SORT FIELDS=COPY
INCLUDE COND=(32,4,Y2T,EQ,Y'DATE2'-1)
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Tue Jul 15, 2014 5:00 pm
Reply with quote

HI Bill,


Yes , I have only YY... How ever DATE2 is Different than Y'DATE2'


Y'DATE2',
Y'DATE2'-m,
Y'DATE2'+m format is Y'yymm'

Please Correct me If iam wrong...
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 Store the data for fixed length COBOL Programming 1
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top