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 Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am


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