MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Omit cond with High values.
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Ram22
Beginner


Joined: 09 Jun 2004
Posts: 33
Topics: 6

PostPosted: Wed Apr 18, 2007 3:50 pm    Post subject: Omit cond with High values. Reply with quote

Hi all,

I am using Syncsort. I tried using the below Omit cond to remove the record which has high values in the first 262 positions. After the sort the record still exists. I tried reducing the number from 261 to 100 just to give a thought of size but still it did not work. Can any one please help me out in this.

Code:
OMIT COND=(1,261,CH,EQ,X'FF')


The record in hex format
Code:
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF


Pl let me know if I need to provide more info

Ram
Back to top
View user's profile Send private message
Ram22
Beginner


Joined: 09 Jun 2004
Posts: 33
Topics: 6

PostPosted: Wed Apr 18, 2007 3:59 pm    Post subject: Reply with quote

Just to add more, the sort card I used Is:

Code:

SORT FIELDS=(33,46,CH,A)     
SUM FIELDS=NONE,XSUM         
OMIT COND=(1,100,CH,EQ,X'FF')


Again, to explain more I am trying to filter a file which has duplicates to write a file with unique records. So, could get with XSUM and sort. But the input file does have trailer record with the first 262 chars as high values and a value from 263 to 272. After eliminating duplicates, the value in the trailer record need to be changed. So, I am trying to remove the exisisting trailer record and add a new one. If i can achieve this with out removing the existing record, can any one pls provide me some hlep?

Ram
Back to top
View user's profile Send private message
Ram22
Beginner


Joined: 09 Jun 2004
Posts: 33
Topics: 6

PostPosted: Thu Apr 19, 2007 10:05 am    Post subject: Reply with quote

All,

Any help is appreciable. I am trying many combinations to achieve this. I tried taking the solutions which involves similar situations, but could end without result.

Pls let me know if I need to provide any more information on what I am trying to do.

Ram
Back to top
View user's profile Send private message
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Thu Apr 19, 2007 10:29 am    Post subject: Reply with quote

Ram22,

Your x'FF' is being padded to the right with filler characters to make a constant that is 261 bytes long. This will not equal a 261 byte field containing all x'FF'.

You should check your Syncsort manual.
_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
Ram22
Beginner


Joined: 09 Jun 2004
Posts: 33
Topics: 6

PostPosted: Thu Apr 19, 2007 10:40 am    Post subject: Reply with quote

Mervyn, I am extreamly sorry but I could not understand your suggestion. Can you please explain in detail.

Ram
Back to top
View user's profile Send private message
amargulies
Beginner


Joined: 10 Jan 2007
Posts: 123
Topics: 0

PostPosted: Thu Apr 19, 2007 11:29 am    Post subject: Reply with quote

If there are no records with X'FF' as valid data in the first byte, the try just specifying:
Code:
OMIT COND=(1,1,CH,EQ,X'FF')

_________________
Alissa Margulies
SyncSort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Back to top
View user's profile Send private message Send e-mail
Ram22
Beginner


Joined: 09 Jun 2004
Posts: 33
Topics: 6

PostPosted: Thu Apr 19, 2007 12:15 pm    Post subject: Reply with quote

Amarqulies,

My requirement is to check for the first 261, thats the reason I am facing problem. Otherwise to chek only one position your solution might have worked.

Ram
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Apr 19, 2007 3:30 pm    Post subject: Reply with quote

Ram22,

I thought *some one* would have answered it by now. Any ways the max bytes you can check for include/omit condition for syncsort is 256 for character data. try this control card instead

Code:

OMIT COND=(1,261,SS,EQ,X'FF')


Hope this helps....

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Thu Apr 19, 2007 3:38 pm    Post subject: Reply with quote

Kolusu,

I have a question here...

As far as I understand, Ram22 wants to omit a record which has High Values in the first 261 bytes (ALL bytes between 1-261).

Your solution, would omit the record which has X'FF' (high value) anywhere in the first 261 bytes. Meaning, if he has a valid record which has some data followed by some highvalues and again data, even this will be omitted.

Infact Ram22 rejected AMargulies's solution for the same reason. He doesnot want to check for just ONE (or more) positions. He wants the entire 261 bytes to be compared.

I accept that both Your solution and AMargulies solution will work for the case posted here. But who knows, the actual scenario that Ram is facing might be different - where he may have highvalues in some of his valid records also.

Ram22,
Please correct me if my understanding of the question is wrong.

Thanks,
Phantom
Back to top
View user's profile Send private message
Ram22
Beginner


Joined: 09 Jun 2004
Posts: 33
Topics: 6

PostPosted: Thu Apr 19, 2007 3:50 pm    Post subject: Reply with quote

Phantom,

My requirement is perfect as you thought. I need to omit a record only if it has all 261 positions with high values.

Regards & Thanks,
Ram
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Thu Apr 19, 2007 4:19 pm    Post subject: Reply with quote

well, it appears that syncsort is not the way to go.

Quote:
Any ways the max bytes you can check for include/omit condition for syncsort is 256 for character data.


unless you can build multiple OMIT's with AND connectors to interrogate all 261 characters.

Alissa has been active in the forum today. maybe she has an answer.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Thu Apr 19, 2007 6:41 pm    Post subject: Reply with quote

Well, I'm not Alissa, but ...

This would work with DFSORT (and probably with Syncsort):

Code:

  OMIT COND=(1,256,CH,EQ,X'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF*
 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF*
 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF*
 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF*
 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF*
 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF*
 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF*
 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF',AND,                 
   257,5,CH,EQ,X'FFFFFFFFFF')                                           


Note that there should be two blanks before OMIT and one blank before each line of FFs with the *s in position 72.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Fri Apr 20, 2007 4:11 am    Post subject: Reply with quote

Since we're playing around a bit, and because 261 divides by 9, how about:

Code:

 OMIT COND=(1,29,CH,EQ,                                               
      X'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF', 
 AND,1,29,EQ,30,29,                                                   
 AND,1,29,EQ,59,29,                                                   
 AND,1,87,EQ,88,87,                                                   
 AND,1,87,EQ,175,87)                                                 

_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
Ram22
Beginner


Joined: 09 Jun 2004
Posts: 33
Topics: 6

PostPosted: Fri Apr 20, 2007 10:23 am    Post subject: Reply with quote

Mervyn,

This code, for Syncsort says as Invalid format. Below is the error
Code:

 SYSIN :                                                                 
   SORT FIELDS=(33,46,CH,A)                                               
   SUM FIELDS=NONE,XSUM                                                   
   OMIT COND=(1,29,CH,EQ,                                                 
          X'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF', 
    AND,1,29,EQ,30,29,                                                   
              *                                                           
    AND,1,29,EQ,59,29,                                                   
    AND,1,87,EQ,88,87,                                                   
    AND,1,87,EQ,175,87)                                                   
 WER251A  INCLUDE/OMIT INVALID FORMAT                                     
 WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                           


Ram
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Apr 20, 2007 10:32 am    Post subject: Reply with quote

Ram22,

Mervyn missed to include the format of the field to be compared. try these control cards
Code:

SORT FIELDS=COPY                                                   
OMIT COND=(1,29,CH,EQ,                                             
      X'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF',
 AND,1,29,CH,EQ,30,29,CH,                                           
 AND,1,29,CH,EQ,59,29,CH,                                           
 AND,1,87,CH,EQ,88,87,CH,                                           
 AND,1,87,CH,EQ,175,87,CH)                                         


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group