|
View previous topic :: View next topic
|
| Author |
Message |
ramfrom84
New User

Joined: 23 Aug 2006 Posts: 93 Location: chennai
|
|
|
|
Hi All,
See the below code , SORT abend occurs due to split in the value mention in the cond column. Can any one help me to solve this problem?
INCLUDE COND=(1032,3,EQ,C'3CR',AND,9,3,EQ,C'AGE,ARX,ATE,AUG,
A5D,A75,N4Q,YCM,0BA,118,5YV,3CR'),FORMAT=SS |
|
| Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Please post the output from your job which clearly shows the error and the associated error message, i.e. ICE.... or WER...
This will help people to help you. |
|
| Back to top |
|
 |
cpuhawg
Active User

Joined: 14 Jun 2006 Posts: 331 Location: Jacksonville, FL
|
|
|
|
This should also work:
| Code: |
INCLUDE COND=((1032,3,EQ,C'3CR'),AND,
(9,3,EQ,C'AGE,ARX,ATE,AUG,A5D,A75,N4Q,YCM,0BA,118,5YV,3CR')),
FORMAT=SS
|
|
|
| Back to top |
|
 |
superk
Global Moderator

Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
| Aren't there some AND or OR statements missing? |
|
| Back to top |
|
 |
cpuhawg
Active User

Joined: 14 Jun 2006 Posts: 331 Location: Jacksonville, FL
|
|
|
|
You are correct. Multiple OR's work for FILEAID, but not for SORT:
| Code: |
INCLUDE COND=((1032,3,CH,EQ,C'3CR'),AND,
(9,3,CH,EQ,C'AGE',OR,
(9,3,CH,EQ,C'ARX',OR,
(9,3,CH,EQ,C'ATE',OR,
(9,3,CH,EQ,C'AUG',OR,
(9,3,CH,EQ,C'A5D',OR,
(9,3,CH,EQ,C'A75',OR,
(9,3,CH,EQ,C'N4Q',OR,
(9,3,CH,EQ,C'YCM',OR,
(9,3,CH,EQ,C'0BA',OR,
(9,3,CH,EQ,C'118',OR,
(9,3,CH,EQ,C'5YV',OR,
(9,3,CH,EQ,C'3CR')),
FORMAT=SS
|
|
|
| Back to top |
|
 |
cpuhawg
Active User

Joined: 14 Jun 2006 Posts: 331 Location: Jacksonville, FL
|
|
|
|
Too many left parenthesis.....
| Code: |
INCLUDE COND=((1032,3,CH,EQ,C'3CR'),AND,
(9,3,CH,EQ,C'AGE',OR,
9,3,CH,EQ,C'ARX',OR,
9,3,CH,EQ,C'ATE',OR,
9,3,CH,EQ,C'AUG',OR,
9,3,CH,EQ,C'A5D',OR,
9,3,CH,EQ,C'A75',OR,
9,3,CH,EQ,C'N4Q',OR,
9,3,CH,EQ,C'YCM',OR,
9,3,CH,EQ,C'0BA',OR,
9,3,CH,EQ,C'118',OR,
9,3,CH,EQ,C'5YV',OR,
9,3,CH,EQ,C'3CR')),
FORMAT=SS
|
|
|
| Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
I must admit that I initially thought that, but somewhere in the back of my mind I sort of recalled something about multiple search options.
| Quote: |
| Find a field value within a constant. For example, you can search the character constant C'J69,L92,J82' for the value in a 3-byte field. If the field value is C'J69', C'L92', or C'J82', the relational condition is true; if the field value is C'X24', the relational condition is false. Note that the comma is used within the constant to separate the valid 3-character values; any character that will not appear in the field value can be used as a separator in the constant. |
But the way I understand this, is that you can specify multiple options to be searched for in one place, rather than multiple OR statements. |
|
| Back to top |
|
 |
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1054 Location: Richmond, Virginia
|
|
|
|
| Does FORMAT=SS work for all mainframe SORT programs? |
|
| Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
| Certainly does for DFSORT |
|
| Back to top |
|
 |
ramfrom84
New User

Joined: 23 Aug 2006 Posts: 93 Location: chennai
|
|
|
|
This is my ABEND Message
| Code: |
SYSIN :
SORT FIELDS=COPY
INCLUDE COND=(1032,3,EQ,C'3CR',AND,9,3,EQ,C'AGE,ARX,ATE,AUG,A5D,A75,*
*
A5D,A75,N4Q,YCM,0BA,118,5YV,3CR'),FORMAT=SS
*
WER251A INCLUDE/OMIT INVALID FORMAT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE |
we did not give as separately since it has 800 value in the cond caluse, we have some 8000 OR statements. Please suggest me to give in the single line.
Thanks for ur interest |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
You are using Syncsort - many DFSORT options either do not exist or have different syntax in Syncsort.
Are you sure that you can use 8000 OR statements?
If i've time later, i'll look, but in the meantime, you might want to refer to the Syncsort manual.
Sounds like a bit of code would be done quickly. . . |
|
| Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Sounds like a job for a SELECT clause, but there again that's for DFSORT.
Or, you could code multiple OR statements, each one on a new line. |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
You can do the kind of thing you want with INCLUDE and OR in Synsort.
I've not been able to find the limit on the number of ORs you may use in a single execution. I suspect it is below 8000.
If this was my requirement, i'd read the 8000 values into an array (making sure the values were in sequence) then read the input data file and do a binary search on the 8000 entry array. I'd keep the records i want and skip the others. As time goes by, the list of values could be updated, but no code would need to change as nothing would be hard-coded. |
|
| Back to top |
|
 |
ksreddy
New User

Joined: 30 Mar 2005 Posts: 12 Location: Hyderabad
|
|
|
|
Hi ram,
Use the control statements given by cpuhawg.
It should work for syncsort.
Your error message clearly tells that it was a continuation error. |
|
| Back to top |
|
 |
subratghose
New User

Joined: 06 Dec 2006 Posts: 4 Location: India
|
|
|
|
Have you tried giving FORMAT=SS at beginning like,
SORT FIELDS=COPY
INCLUDE FORMAT=SS,
COND=(1,700,EQ,C'TSO 08CW2CT7B97',OR, ............ |
|
| Back to top |
|
 |
Anuj Dhawan
Superior Member

Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Hi Subrat,
Hopefully you've noticed the date of last post of this thread, just before your post. If you will search around you will found there are many other live discussons going on, you'll enjoy there rather..  |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|