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

how to verify the duplicates in a field


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
swarnasuneel

New User


Joined: 20 Apr 2012
Posts: 20
Location: chennai

PostPosted: Mon Aug 27, 2012 3:34 pm
Reply with quote

Hi,

in one of my file the field name is SEQ_NO of 10 digits(0000000001,0000000002,0000000003....).it will start from 1St position my req is . i have to check the whether it contains any duplicates in that filed by using JCl.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Aug 27, 2012 3:58 pm
Reply with quote

Can you show this as a sample input file with the Code tags, expected output file (if any) and any other expected results, please?
Back to top
View user's profile Send private message
swarnasuneel

New User


Joined: 20 Apr 2012
Posts: 20
Location: chennai

PostPosted: Mon Aug 27, 2012 4:03 pm
Reply with quote

Code:
SEQ_NO                          PLCY_NO                    PAYEE_NAME
0000000001                     321354654                   xxxxxxxxxx
0000000002                     323626523                   kjcskjksjfskj

MY req is i have written a step nfor seq no generaion.but as a tester a have to check the whether seq no is added properly R not,ANY JUNCK values added in the seq_no i have ti verify by using jcl...
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Aug 27, 2012 4:31 pm
Reply with quote

So you want to check that the sequence numbers you have generated are in sequence?

In a COPY step, append (if fixed-length records) or prepend a sequence number.

Using OUTFIL OMIT, exclude all records where the generated sequence number is equal to that on the file.

Your output dataset should be empty, unless there are problems.
Back to top
View user's profile Send private message
swarnasuneel

New User


Joined: 20 Apr 2012
Posts: 20
Location: chennai

PostPosted: Mon Aug 27, 2012 4:37 pm
Reply with quote

icon_sad.gif i dont get u could u please send the sort card..if possible
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Mon Aug 27, 2012 5:19 pm
Reply with quote

Search the forum for the words I typed in CAPS and you should find examples which you can use.

It is very simple. Are you a beginner with DFSORT? Can you show the ICE201I message from the sysout of a sort step please?
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Mon Aug 27, 2012 10:19 pm
Reply with quote

use the following DFSORT JCL which will give you the desired results
Code:

/STEP0100 EXEC PGM=SORT                                         
/SYSOUT   DD SYSOUT=*                                           
/SORTIN   DD *                                                   
0000000001                     321354654                   XXXXXXX
0000000002                     323626523                   KJCSKJK
0000000004                     323626528
/SORTOUT  DD SYSOUT=*                                           
/SYSIN    DD *                                                   
 OPTION COPY                                                     
 INREC BUILD=(1,10,X,SEQNUM,10,ZD,X,C'GOOD')                     
 OUTREC IFTHEN=(WHEN=(1,10,CH,NE,12,10,CH),OVERLAY=(23:C'BAD '))
 OUTFIL INCLUDE=(23,4,CH,EQ,C'BAD'),ACCEPT=1                     
//*
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Tue Aug 28, 2012 5:18 am
Reply with quote

Hi Skolusu,

just a small adjustment is needed in the SORTIN DD * data,

it needs another leading zero to make it to 10 bytes.


Gerry
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Aug 28, 2012 5:46 am
Reply with quote

Thanks Gerry. Updated.
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 Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
No new posts S0C7 - Field getting overlayed COBOL Programming 2
No new posts Masking variable size field - min 10 ... DFSORT/ICETOOL 4
Search our Forums:

Back to Top