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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to filter out the data by YYMM(year and mon using DFSORT
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Tue Jul 15, 2014 4:53 pm    Post subject: Reply to: How to filter out the data by YYMM(year and mon us
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    Post subject: Reply to: How to filter out the data by YYMM(year and mon us
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    Post subject: Reply to: How to filter out the data by YYMM(year and mon us
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    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 Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm
No new posts Paasing symbolic parameter to instrea... Robert Sample JCL & VSAM 2 Thu Jul 27, 2017 1:22 pm
No new posts Passing data from REXX to C programme... chong.zhou CLIST & REXX 3 Wed Jul 26, 2017 9:11 pm
No new posts copying data without knowing location Arun Raj DFSORT/ICETOOL 12 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm


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