IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

how to bypass this record?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mohitsaini
Warnings : 1

New User


Joined: 15 May 2006
Posts: 92

PostPosted: Wed Jul 02, 2008 8:26 pm
Reply with quote

My data is something like this:

Claim# | Trans | Date/Time | Line-Count
188007615401 | 00 | 20080505/1506373 | 5
188007615401 | 74 | 20080505/1506373 | 4
188007615401 | 00 | 20080505/ 921269 | 4

My requirement is when

"Trans = 74" AND "the previous Trans = 00" AND "Date/Time is matching for both of them"

THEN bypass all the records belonging to claim# 188007615401.

Thanks,
Mohit
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Wed Jul 02, 2008 10:43 pm
Reply with quote

Mohitsaini,


The following DFSORT/ICETOOL JCL will produce the desired results. I assumed that your input is 80 bytes and of FB recfm.

Code:

//STEP0100 EXEC PGM=ICETOOL                                 
//TOOLMSG  DD SYSOUT=*                                     
//DFSMSG   DD SYSOUT=*                                     
//IN       DD *                                             
----+----1----+----2----+----3----+----4----+----5----+----6
188007615401 | 00 | 20080505/1506373 | 5                   
188007615401 | 74 | 20080505/1506373 | 4                   
188007615401 | 00 | 20080505/ 921269 | 4                   
//OUT      DD SYSOUT=*                                     
//TOOLIN   DD *                                             
  SPLICE FROM(IN) TO(OUT) ON(1,12,CH) KEEPNODUPS WITHALL - 
  WITH(1,80) KEEPBASE USING(CTL1)                           
//CTL1CNTL DD *                                             
  INREC IFTHEN=(WHEN=(16,2,CH,EQ,C'74'),OVERLAY=(81:20,18))
  SORT FIELDS=(01,12,CH,A,81,18,CH,D)                       
  OUTFIL FNAMES=OUT,BUILD=(01,80),                         
  OMIT=(20,18,CH,EQ,81,18,CH,AND,16,2,CH,EQ,C'00')         
/*


Hope this helps...

Cheers
Back to top
View user's profile Send private message
mohitsaini
Warnings : 1

New User


Joined: 15 May 2006
Posts: 92

PostPosted: Thu Jul 03, 2008 11:40 am
Reply with quote

Thanks Kolusu
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Validating record count of a file is ... DFSORT/ICETOOL 13
Search our Forums:

Back to Top