View previous topic :: View next topic
|
Author |
Message |
bhattu
New User
Joined: 05 Jun 2009 Posts: 9 Location: US
|
|
|
|
Hi I want to remove the duplicate records with binary/system characters.
Here is the input file(VB)
100000008020000000000044444444420100712000000000000B
2Yññ 9 ºh¯í <Ràñt6 B8^®Ù 1 ÜÏÙÚ/YCÚ ±"Üü@« ó
100000008020000000000044444444420100712000000000000F
2Yññ 9 ºh¯í <Ràñt6 B8^®Ù 1 ÜÏÙÚ/YCÚ ±"Üü@« ó
2Yññ 9 ºh¯í <Ràñt6 B8^®Ù 1 ÜÏÙÚ/YCÚ ±"Üü@« ó
100000008020000000000044444444420100714777777777777B
2Yññ 9 ºh¯í <Ràñt6 B8^®Ù 1 ÜÏÙÚ/YCÚ ±"Üü@« ó
100000008020000000000044444444420100714777777777777F
2Yññ 9 ºh¯í <Ràñt6 B8^®Ù 1 ÜÏÙÚ/YCÚ ±"Üü@« ó
2Yññ 9 ºh¯í <Ràñt6 B8^®Ù 1 ÜÏÙÚ/YCÚ ±"Üü@« ó
I want in output file(VB) as.
100000008020000000000044444444420100712000000000000B
100000008020000000000044444444420100712000000000000F
100000008020000000000044444444420100714777777777777B
100000008020000000000044444444420100714777777777777F |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
I want to remove the duplicate records with binary/system characters. |
I have no idea what you mean by this or what your example represents.
You need to explain clearly what your example shows and what rules you want to use to go from input to output.
Note that duplicate records are normally removed with SORT or MERGE and SUM FIELDS=NONE, or with ICETOOL's SELECT operator. So perhaps you could read up on those and figure it out yourself if you can't explain what you want better. |
|
Back to top |
|
|
bhattu
New User
Joined: 05 Jun 2009 Posts: 9 Location: US
|
|
|
|
Hi Frank,
Thanks for responding to my mail,
I want to eliminate the special character records, her in my example
record 2,4,5,7,9 and 10.
I used the ICETOOL toolin as
SUBSET FROM(IN) TO(OUT) INPUT REMOVE RRN(2) RRN(4) RRN(5) RRN(7) RRN(9) RRN(10)
and it is giving me what i want , but this is only when i know the position of the record. here i have very few records.
but what if i have thousands of records, where if i keep on specifying the RRN for the thousands of record it is odd.
so i want a sort JCL where it can look for those records and remove them.
i know how to sort when the strings are characters or numbers , don't know how to sort when it is special characters or system converted charcters.
can i take the Hex value of particular system converted string and do sort.
on that.
Can you please suggest. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Why do you mention " remove the duplicate records with binary/system characters. "?
Is there only one set of values for the records to be discarded?
Will all of the "good" records have a 1 (one) in position 1? Will all of the "bad" records have something other than a 1?
You need to determine and post processing rules that can be put into code. |
|
Back to top |
|
|
bhattu
New User
Joined: 05 Jun 2009 Posts: 9 Location: US
|
|
|
|
Will all of the "good" records have a 1 (one) in position 1? Will all of the "bad" records have something other than a 1?
yes good records have 1 in position 1 and bad records have somehting other than 1.
I am trying to use this JCL, it is giving me zero reocrds.
Code: |
//STEP3 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=TEST.IMAGE.UNTERSE,DISP=SHR
//SORTOUT DD DSN=TEST1.IMAGE.UNTERSE.SORTDUP,DISP=SHR
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(1,1,CH,EQ,C'1')
/*
|
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Is the file fixed length or variable? If the file is variable, you need to add 4 to the starting position. . . |
|
Back to top |
|
|
bhattu
New User
Joined: 05 Jun 2009 Posts: 9 Location: US
|
|
|
|
Hi dick scherrer,
It is VB, i added 4 bits it worked thank you.
thanks to all. |
|
Back to top |
|
|
bhattu
New User
Joined: 05 Jun 2009 Posts: 9 Location: US
|
|
|
|
i used the following JCL
Code: |
//STEP3 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=TEST.IMAGE.UNTERSE,DISP=SHR
//SORTOUT DD DSN=TEST1.IMAGE.UNTERSE.SORTDUP,DISP=SHR
//SYSIN DD *
SORT FIELDS=COPY
OMIT COND=(5,4,CH,EQ,C'2Yññ')
/* |
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Good to hear it is working - thank you for letting us know and posting your solution
Keep in mind that adding 4 is 4 bytes - not bits. . .
d |
|
Back to top |
|
|
|