Skip / Omit a group of records



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Skip / Omit a group of records

Postby rajaranganathan » Fri Feb 14, 2014 11:42 pm

Hi All,

I have requirement that i need to skip/omit a group of records if a key position is '3098'

Here #DMPA is the header record and the #EOT is the trailer/end record in between in the second line value called with "3098 " (Highlighted below) in the position of 19-22 , if that's 3098 i need to remove whole set of Header to trailer. Kindly guide me the options if any.

For your information: Again the second set of records starts with #DDPA and ends with #EOT (same)

Given below is the sample records.

#DMPA FROM 147848151514 TO 544854554 44487484851581851
01022122973114021330987939290****************************************
****************************************
****************************************
****************************************
****************************************
#EOT 000332430 00007
#DDSP FROM 3108861300 TO 054744677 140214 0619 000332430
014822 0221229731 PFEG1402140616-05:0009951
#EOT 000332430 00010


Thanks
Raja.R
rajaranganathan
 
Posts: 27
Joined: Thu Oct 10, 2013 6:44 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Skip / Omit a group of records

Postby Terry Heinze » Sat Feb 15, 2014 1:36 am

Please use Code tags for readability and uniform character spacing. Example:
This line has been "coded".
.... Terry
Terry Heinze
 
Posts: 239
Joined: Wed Dec 04, 2013 11:08 pm
Location: Richfield, MN, USA
Has thanked: 12 times
Been thanked: 11 times

Re: Skip / Omit a group of records

Postby Terry Heinze » Sat Feb 15, 2014 1:37 am

#DMPA FROM 147848151514 TO 544854554 44487484851581851
01022122973114021330987939290****************************************
****************************************
****************************************
****************************************
****************************************
#EOT 000332430 00007
#DDSP FROM 3108861300 TO 054744677 140214 0619 000332430
014822 0221229731 PFEG1402140616-05:0009951
#EOT 000332430 00010

.... Terry
Terry Heinze
 
Posts: 239
Joined: Wed Dec 04, 2013 11:08 pm
Location: Richfield, MN, USA
Has thanked: 12 times
Been thanked: 11 times

Re: Skip / Omit a group of records

Postby rajaranganathan » Sat Feb 15, 2014 3:43 pm

Hi Terry,

Thanks for your points, i have an idea that we need to group this and make it but i have no idea how to check for a value and skip the whole group ?

Please advice
rajaranganathan
 
Posts: 27
Joined: Thu Oct 10, 2013 6:44 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Skip / Omit a group of records

Postby NicC » Mon Feb 17, 2014 4:48 pm

Raja. Your last post was deleted as it breached forum rules. Remember: people reply/assist as and when they want, for free, on their own time. Also, many like to keep their weekend free from work related topics.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Skip / Omit a group of records

Postby skolusu » Tue Feb 18, 2014 2:54 am

assuming your lrecl=80 and recfm=fb,use the following control cards

//SYSIN    DD *                                                       
  OPTION COPY                                                         
  INREC IFTHEN=(WHEN=GROUP,END=(1,4,CH,EQ,C'#EOT'),                   
  PUSH=(81:ID=8,SEQ=3)),                                               
  IFTHEN=(WHEN=GROUP,BEGIN=(89,3,ZD,EQ,1),PUSH=(100:1,80),RECORDS=2), 
  IFTHEN=(WHEN=GROUP,BEGIN=(89,3,ZD,EQ,2,AND,19,4,CH,EQ,C'3098'),     
  END=(1,4,CH,EQ,C'#EOT'),PUSH=(93:19,4))     
                         
  OUTFIL OMIT=(93,4,CH,EQ,C'3098',OR,89,3,ZD,EQ,1),                   
  IFOUTLEN=80,IFTHEN=(WHEN=(89,3,ZD,EQ,2),BUILD=(100,80,/,1,80))       
//*                                                                   
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post