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
 

 

Select record based on Date with condtion

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Senthilkumar k
Warnings : 1

New User


Joined: 07 May 2009
Posts: 51
Location: Chennai

PostPosted: Thu Jul 23, 2009 11:24 pm    Post subject: Select record based on Date with condtion
Reply with quote

I have a requirement like below, can any one help me,

I have a VSAM(KSDS) file like below, LRECL = 550

SE1879909277768296200907241150P086690.... .
SE1879909277768296200907241150P086691.... .
SE1879909277768296200907241150P086692.... Y
SE1979909277956094311502009072319911366.. .
SE1979909277956094311502009072319915878..Y

1. If byte from 1 to 4 is equal to SE18 and bytes from 19 to 26 is greater than (current date - 7).
(OR)
2. If byte from 1 to 4 is equal to SE19 and byte from 24 to 31 is greater
than (current date - 7).
(OR)
3. If byte 42 is not equal to Y.

If above any one of the condition is satisfied for a record then needs to write that record into file1.
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri Jul 24, 2009 12:04 am    Post subject: Reply to: Select record based on Date with condtion
Reply with quote

senthilkumar,

Use the following DFSORT control cards

Code:

//SYSIN    DD *                                                 
  SORT FIELDS=COPY   
  RECORD TYPE=F                                           
  INCLUDE COND=((01,4,CH,EQ,C'SE18',AND,19,8,CH,GT,DATE1-7),OR, 
                (01,4,CH,EQ,C'SE19',AND,24,8,CH,GT,DATE1-7),OR, 
                 42,1,CH,EQ,C'Y')                               
/*
Back to top
View user's profile Send private message
Senthilkumar k
Warnings : 1

New User


Joined: 07 May 2009
Posts: 51
Location: Chennai

PostPosted: Sun Jul 26, 2009 1:40 am    Post subject:
Reply with quote

HI Skolusu,
Thanks for your code. It worked fine as I expected.
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 Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm


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