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
 

 

how to verify the duplicates in a field

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: how to verify the duplicates in a field
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Mon Aug 27, 2012 3:58 pm    Post subject: Reply to: how to verify the duplicates in a field
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    Post subject: Reply to: how to verify the duplicates in a field
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Mon Aug 27, 2012 4:31 pm    Post subject: Reply to: how to verify the duplicates in a field
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    Post subject: Reply to: how to verify the duplicates in a field
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Mon Aug 27, 2012 5:19 pm    Post subject: Reply to: how to verify the duplicates in a field
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    Post subject:
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: 1703
Location: Australia

PostPosted: Tue Aug 28, 2012 5:18 am    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7225

PostPosted: Tue Aug 28, 2012 5:46 am    Post subject: Reply to: how to verify the duplicates in a field
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    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 Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts PDSFAST VERIFY - What does it really ... shetttigarvivek JCL & VSAM 1 Tue Nov 29, 2016 9:21 am
No new posts Updating the counters after eliminati... PANDU1 DFSORT/ICETOOL 12 Mon Nov 21, 2016 9:47 am
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm


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