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 Record Not found in AlX but record re... mukun264 COBOL Programming 5 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 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