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

Remove Duplicate lines


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Priyanka Pyne

New User


Joined: 09 Feb 2008
Posts: 95
Location: India

PostPosted: Thu Sep 15, 2011 1:37 am
Reply with quote

Hi,

My input file looks like

Code:
I  031173                    1341428       0         H                           1
D         032863          1343710       7         H                           4
D         032973          1343865       7         H                           1
D         034284          1345636       7         H                           1
                       POL-NUMBER INFORCE FILL-B1 COMP-IND PAY-LIMIT INF-AGENCY
ID NREC-# OREC-#       <---+---->      <> <>      -        <>              <-->
                       POL-NUMBER INFORCE FILL-B1 COMP-IND PAY-LIMIT INF-AGENCY
ID NREC-# OREC-#       <---+---->      <> <>      -        <>              <-->
D         037587          1350080       7         H                           4
D         038336          1351121       7         H                           4
D         039844          1353438       7         H                           1
D         040029          1353757       7         H                          12
D         041357          1355876       7         H                           2
D         041705          1356415       7         H                          12
D         044720          1360757       7         H                           4
D         047036          1364121       7         H                           4
D         047248          1364456       7         H                           1
D         050317          1368930       0         H                          12


Now the header line i.e.

Code:
                       POL-NUMBER INFORCE FILL-B1 COMP-IND PAY-LIMIT INF-AGENCY
ID NREC-# OREC-#       <---+---->      <> <>      -        <>              <-->
                       POL-NUMBER INFORCE FILL-B1 COMP-IND PAY-LIMIT INF-AGENCY
ID NREC-# OREC-#       <---+---->      <> <>      -        <>              <-->


coming multiple times in my output file. I want to remove the duplicate occurrence of this particular line but want to keep the first one. I tried with the following sort card
Code:
   SORT FIELDS=(5,32667,CH,A)
   SUM FIELDS=NONE,XSUM     


but it is giving me error.

Code:
   SORT FIELDS=(5,32667,CH,A)                   
                  *                             
   SUM FIELDS=NONE,XSUM                         
WER271A  SORT STATEMENT    : NUMERIC FIELD ERROR
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000   


Can anyone suggest me something else.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu Sep 15, 2011 4:31 am
Reply with quote

Hi,

I believe the maximum length you can sort is 4092 byte, so you need to break your fields down
ie.
Code:
  SORT FIELDS=(5,4092,CH,A,4907,4092,CH,A,8189,4092,CH,A etc



Gerry
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 Duplicate transid's declared using CEDA CICS 3
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Remove leading zeroes SYNCSORT 4
No new posts Duplicate several members of/in one l... JCL & VSAM 7
No new posts Newbie Stuck on "Duplicate Datas... TSO/ISPF 5
Search our Forums:

Back to Top