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
 

 

Remove Duplicate lines

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Remove Duplicate lines
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: 1703
Location: Australia

PostPosted: Thu Sep 15, 2011 4:31 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts Insert Lines in JCL with Rexx after a... Willy Jensen CLIST & REXX 3 Tue Aug 30, 2016 4:18 pm
No new posts Remove Special Characters from Mainfr... Rodger Zhang All Other Mainframe Topics 6 Wed Jul 06, 2016 1:12 am
No new posts how to find the duplicate list RAVIGUPTA1990 DB2 6 Wed Mar 30, 2016 12:11 am


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