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 Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am


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