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
 

 

Skip records having a field value 13 months less than today

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Ezhil Murugan

New User


Joined: 10 Jul 2008
Posts: 14
Location: Chennai

PostPosted: Mon Aug 25, 2008 11:46 am    Post subject: Skip records having a field value 13 months less than today
Reply with quote

I've a File with around 300,000 records in it. I need to skip all records which has effective date value 13 months earlier to current date.
The effective date starts from 16th byte in the file and has a length of 6 bytes, It is in MMDDYY format


Ezhil
Back to top
View user's profile Send private message

Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon Aug 25, 2008 2:37 pm    Post subject:
Reply with quote

you should use
Code:

  OMIT COND=(16,6,ZD,LE,Y'DATE1'-360)


for more see
[url]
www.ibm.com/systems/support/storage/software/sort/mvs/tricks/
[/url]
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: Mon Aug 25, 2008 8:17 pm    Post subject:
Reply with quote

Hello Ezhil,

Which sort product is used on your system (probably DFSORT or Syncsort)?

If you are not sure, the product information is at the top of the information created when a sort is run.

Knowing which sort product is used to determine which part of the forum supports your question.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon Aug 25, 2008 9:36 pm    Post subject:
Reply with quote

Quote:

OMIT COND=(16,6,ZD,LE,Y'DATE1'-360)


This OMIT statement is invalid. A Y-constant cannot be used with ZD format - it can only be used with Y2x format. This would be valid:

Code:

  OMIT COND=(16,6,Y2W,LE,Y'DATE1'-360)


And you'd need to set the century window correctly (Y2PAST option).

However, 30 * 13 is NOT really equivalent to 13 months since not every month has 30 days. Starting at a particular day of a month (e.g. August 25th, 2008) and going back 13 months is more subtle than subtracting 360 days unless a rough approximation is good enough.
Back to top
View user's profile Send private message
Ezhil Murugan

New User


Joined: 10 Jul 2008
Posts: 14
Location: Chennai

PostPosted: Tue Aug 26, 2008 8:58 am    Post subject: Reply to: Skip records having a field value 13 months less t
Reply with quote

I get the error message - DSS10080E VALUE 'Y'DATE1'-360' SHOULD HAVE BEEN A VALID SORT CONSTANT' when I try to use the above OMIT . Please help
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2275
Location: @my desk

PostPosted: Tue Aug 26, 2008 10:02 am    Post subject:
Reply with quote

Quote:
DSS10080E


Which SORT product are you using!!!!

Thanks,
Arun
Back to top
View user's profile Send private message
Ezhil Murugan

New User


Joined: 10 Jul 2008
Posts: 14
Location: Chennai

PostPosted: Tue Aug 26, 2008 10:34 am    Post subject: Reply to: Skip records having a field value 13 months less t
Reply with quote

I think it's DFSORT, I could see the following displays in one of my SORT jobs in the SPOOL


1ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED

ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AND MORE

ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 11:39 ON FRI AUG 22, 2008

-0 SORT FIELDS=COPY
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: Tue Aug 26, 2008 10:41 am    Post subject:
Reply with quote

Hello,

Please post the jcl, sort control statements, and the jes output presented by the sort execution.
Back to top
View user's profile Send private message
Ezhil Murugan

New User


Joined: 10 Jul 2008
Posts: 14
Location: Chennai

PostPosted: Tue Aug 26, 2008 11:51 am    Post subject:
Reply with quote

Hi Sch,
I got that error message when I did a job scan. But the job went fine when I submitted it. Not sure why it is so.. Thanks for all your help. I got the expected results and what I need to do if the date in the file is in YYMMDD format?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Tue Aug 26, 2008 12:48 pm    Post subject: Reply to: Skip records having a field value 13 months less t
Reply with quote

Quote:
got that error message when I did a job scan. But the job went fine when I submitted it. Not sure why it is so


because job scanners are seldom in sync with the current syntax for dsfsort and syncsort
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
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 READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm


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