View previous topic :: View next topic
|
Author |
Message |
swarnasuneel
New User
Joined: 20 Apr 2012 Posts: 20 Location: chennai
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
swarnasuneel
New User
Joined: 20 Apr 2012 Posts: 20 Location: chennai
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
swarnasuneel
New User
Joined: 20 Apr 2012 Posts: 20 Location: chennai
|
|
|
|
i dont get u could u please send the sort card..if possible |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
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 |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Thanks Gerry. Updated. |
|
Back to top |
|
|
|