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

How to remove the duplicate records with binary/system chara


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

New User


Joined: 05 Jun 2009
Posts: 9
Location: US

PostPosted: Fri Nov 12, 2010 2:05 am
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Nov 12, 2010 3:04 am
Reply with quote

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
View user's profile Send private message
bhattu

New User


Joined: 05 Jun 2009
Posts: 9
Location: US

PostPosted: Fri Nov 12, 2010 8:57 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Nov 12, 2010 9:31 pm
Reply with quote

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
View user's profile Send private message
bhattu

New User


Joined: 05 Jun 2009
Posts: 9
Location: US

PostPosted: Fri Nov 12, 2010 10:06 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Nov 12, 2010 10:21 pm
Reply with quote

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
View user's profile Send private message
bhattu

New User


Joined: 05 Jun 2009
Posts: 9
Location: US

PostPosted: Fri Nov 12, 2010 10:40 pm
Reply with quote

Hi dick scherrer,

It is VB, i added 4 bits it worked thank you.

thanks to all.
Back to top
View user's profile Send private message
bhattu

New User


Joined: 05 Jun 2009
Posts: 9
Location: US

PostPosted: Fri Nov 12, 2010 10:52 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Nov 13, 2010 12:05 am
Reply with quote

Good to hear it is working - thank you for letting us know and posting your solution icon_smile.gif

Keep in mind that adding 4 is 4 bytes - not bits. . .

d
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Sysplex System won't IPL at DR site I... All Other Mainframe Topics 2
No new posts Duplicate transid's declared using CEDA CICS 3
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
Search our Forums:

Back to Top