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
 

 

chunk of records to be removed using date

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

Senior Member


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

PostPosted: Mon Sep 01, 2008 6:46 pm    Post subject: chunk of records to be removed using date
Reply with quote

Hi,
which containes record indicator starting from 9th position as
DH start of header
DD detail line
DC end of header

DH line has date starting from 41th position as dd/mm/yy

i want output asa data after some date say 05/08/08
output should look like


Code:

MARKSGM,DH,8GB232128892000-1-BER1080801,10/08/08
MARKSGM,DD,8GB232128892000-1-BER1080801,T02-0657-02689784-07917,6403599999,,53.44,,8,,
MARKSGM,DD,8GB232128892000-1-BER1080801,T02-2011-04132097-07550,6403511999,,94.67,,8,,
MARKSGM,DD,8GB232128892000-1-BER1080801,T02-2011-04132110-07550,6403511999,,94.67,,8,,
MARKSGM,DD,8GB232128892000-1-BER1080801,T02-2011-04132134-07550,6403511999,,94.67,,8,,
MARKSGM,DC,8GB232128892000-1-BER1080801,001,22173.10
MARKSGM,DH,8GB232128892000-1-BER1080801,01/09/08
MARKSGM,DD,8GB232128892000-1-BER1080801,T02-0657-02689784-07917,6403599999,,53.44,,8,,
MARKSGM,DD,8GB232128892000-1-BER1080801,T02-2011-04132097-07550,6403511999,,94.67,,8,,
MARKSGM,DD,8GB232128892000-1-BER1080801,T02-2011-04132110-07550,6403511999,,94.67,,8,,
MARKSGM,DD,8GB232128892000-1-BER1080801,T02-2011-04132134-07550,6403511999,,94.67,,8,,
MARKSGM,DC,8GB232128892000-1-BER1080801,001,22173.10

Input
Code:
12345678901234567890123456789012345678901234567890
MARKSGM,DH,8GB232128892000-1-BER1080801,01/08/08
MARKSGM,DD,8GB232128892000-1-BER1080801,T02-0657-02689784-07917,6403599999,,53.44,,8,,
MARKSGM,DD,8GB232128892000-1-BER1080801,T02-2011-04132097-07550,6403511999,,94.67,,8,,
MARKSGM,DD,8GB232128892000-1-BER1080801,T02-2011-04132110-07550,6403511999,,94.67,,8,,
MARKSGM,DD,8GB232128892000-1-BER1080801,T02-2011-04132134-07550,6403511999,,94.67,,8,,
MARKSGM,DC,8GB232128892000-1-BER1080801,001,22173.10
MARKSGM,DH,8GB232128892000-1-BER1080801,02/08/08
MARKSGM,DD,8GB232128892000-1-BER1080801,T02-0657-02689784-07917,6403599999,,53.44,,8,,
MARKSGM,DD,8GB232128892000-1-BER1080801,T02-2011-04132097-07550,6403511999,,94.67,,8,,
MARKSGM,DD,8GB232128892000-1-BER1080801,T02-2011-04132110-07550,6403511999,,94.67,,8,,
MARKSGM,DD,8GB232128892000-1-BER1080801,T02-2011-04132134-07550,6403511999,,94.67,,8,,
MARKSGM,DC,8GB232128892000-1-BER1080801,001,22173.10
MARKSGM,DH,8GB232128892000-1-BER1080801,10/08/08
MARKSGM,DD,8GB232128892000-1-BER1080801,T02-0657-02689784-07917,6403599999,,53.44,,8,,
MARKSGM,DD,8GB232128892000-1-BER1080801,T02-2011-04132097-07550,6403511999,,94.67,,8,,
MARKSGM,DD,8GB232128892000-1-BER1080801,T02-2011-04132110-07550,6403511999,,94.67,,8,,
MARKSGM,DD,8GB232128892000-1-BER1080801,T02-2011-04132134-07550,6403511999,,94.67,,8,,
MARKSGM,DC,8GB232128892000-1-BER1080801,001,22173.10
MARKSGM,DH,8GB232128892000-1-BER1080801,01/09/08
MARKSGM,DD,8GB232128892000-1-BER1080801,T02-0657-02689784-07917,6403599999,,53.44,,8,,
MARKSGM,DD,8GB232128892000-1-BER1080801,T02-2011-04132097-07550,6403511999,,94.67,,8,,
MARKSGM,DD,8GB232128892000-1-BER1080801,T02-2011-04132110-07550,6403511999,,94.67,,8,,
MARKSGM,DD,8GB232128892000-1-BER1080801,T02-2011-04132134-07550,6403511999,,94.67,,8,,
MARKSGM,DC,8GB232128892000-1-BER1080801,001,22173.10


Let me know if anything more is needed
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 Sep 01, 2008 11:44 pm    Post subject:
Reply with quote

Here's a DFSORT job that will do what you asked for using the new WHEN=GROUP function available with z/OS DFSORT V1R5 PTF UK90013 (July, 2008). I assumed your input file has RECFM=FB and LRECL=100, but the job can be changed appropriately for other attributes.

Code:

//S1    EXEC  PGM=ICEMAN                                       
//SYSOUT    DD  SYSOUT=*                                       
//SORTIN DD DSN=...  input file (FB/100)                           
//SORTOUT DD DSN=...  output file (FB/100)
//SYSIN    DD    *                                             
  OPTION COPY                                                   
  INREC IFTHEN=(WHEN=GROUP,BEGIN=(9,2,CH,EQ,C'DH'),             
    PUSH=(101:47,2,103:44,2,105:41,2))                         
  OUTFIL INCLUDE=(101,6,CH,GT,C'080805'),BUILD=(1,100)         
/*


If you don't have PTF UK90013, ask your System Programmer to install it.

For complete details on the new WHEN=GROUP function and the other new functions available with PTF UK90013, see:

www.ibm.com/systems/support/storage/software/sort/mvs/ugpf/

Alternatively, you can use more complicated and less efficient technique shown in the "Include or omit groups of records" Smart DFSORT Trick at:

www.ibm.com/systems/support/storage/software/sort/mvs/tricks/
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 Sort Card to Remove Duplicate records... raj4neo SYNCSORT 0 Wed Jan 25, 2017 4:44 am
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm


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