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

chunk of records to be removed using date


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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 Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Sep 01, 2008 11:44 pm
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:

Use [URL] BBCode for External Links

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

Use [URL] BBCode for External Links
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Need help to append a date&tsp at... DFSORT/ICETOOL 9
Search our Forums:

Back to Top