|
View previous topic :: View next topic
|
| Author |
Message |
bodatrinadh
Active User

Joined: 05 Jan 2007 Posts: 101 Location: chennai (India)
|
|
|
|
Hi,
This is my sort code i'm trying to execute
SORT FIELDS=(16,7,CH,A,49,9,CH,A)
INCLUDE COND=(49,9,SS,EQ,C'000000008,000000028,000000040,
000000041,000000042,000000043,000000045,000000046,
000000053,000000055,000000056,000000057,000000059,000000060')
The error i'm getting is in attached doc.
Err Msg:- WER251A INCLUDE/OMIT INVALID SELF DEF TERM
Pls help me in resolving this...
Thanks
-3nadh |
|
| Back to top |
|
 |
prino
Senior Member

Joined: 07 Feb 2009 Posts: 1323 Location: Vilnius, Lithuania
|
|
|
|
| Is is so difficult to paste a screen in Notepad and copy it here between
tags? It would have occupied about 200 bytes, not 92.5K and what's more most people here are far to sensible to download .DOC viruses. |
|
| Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Please reread Prino's post, and then read it again, and again, until you understand what he is saying and then follow his instructions.
Attachments have been deleted. |
|
| Back to top |
|
 |
bodatrinadh
Active User

Joined: 05 Jan 2007 Posts: 101 Location: chennai (India)
|
|
|
|
Pls find the error msg below..
I checked the error code in preview mode, the asterisk (*) under C'000000008' is appearing under 'INCLUDE'. so i decided to share it in attachmate for better understanding.
| Code: |
SYNCSORT FOR Z/OS 1.4.0.0R
SYSIN :
SORT FIELDS=(16,7,CH,A,49,9,CH,A)
INCLUDE COND=(49,9,SS,EQ,C'000000008,000000028,000000040,
*
000000041,000000042,000000043,000000045,000000046,
*
000000053,000000055,000000056,000000057,000000059,000000060')
*
WER161B ALTERNATE PARM USED
WER251A INCLUDE/OMIT INVALID SELF DEF TERM
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE |
Thanks
-3nadh
Post has been edited to use the
tags |
|
| Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
| So what does the manual say about the error messages issued. |
|
| Back to top |
|
 |
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
It seems to me you made up your own syntax.
Additionaly, from the meager information you provided, the format of ss is not required.
So try this:
| Code: |
INCLUDE COND=(49,9,CH,EQ,C'000000008',OR,
49,9,CH,EQ,C'000000028',OR,
49,9,CH,EQ,C'000000040',OR,
..........
49,9,CH,EQ,C'000000060') |
|
|
| Back to top |
|
 |
Anuj Dhawan
Superior Member

Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
I agree with Dave.
There are two forms of the SS condition, e.g:
| Code: |
| 1,3,SS,EQ,C'ABC,DEF,GHI' |
In this form (character string length greater than field length), SS checks the field for each group of three characters. So first it checks the field for 'ABC', then 'BC,' and so on. The comma is not really a delimiter - it's just a way to separate the needed groups of 3 characters.
| Code: |
| 1,80,SS,EQ,C'ABC,DEF,GHI' |
In this form (field length greater than character string length), SS checks for the complete string everywhere in the record. So first it checks 1-11 for 'ABC,DEF,GHI', then it checks 2-12 and so on. The comma is just a character - it's not a delimiter or group separator.
This is the form you're using and explains why it didn't do what you thought it would. Other condition with the ORs, which Dave has shown, should do what you want. |
|
| Back to top |
|
 |
bodatrinadh
Active User

Joined: 05 Jan 2007 Posts: 101 Location: chennai (India)
|
|
|
|
The Error Message is
WER251A INCLUDE/OMIT INVALID SELF DEF TERM
WER251A INCLUDE/OMIT INVALID yyyyyyyyyy
EXPLANATION: The invalid relational condition represented by
yyyyyyyyyy was found in the INCLUDE/OMIT/WHEN/BEGIN/END parameter
specification.
I was trying to replace the following sort card using Substring which i mentioned earlier.
| Code: |
SORT FIELDS=(16,7,CH,A,49,9,CH,A)
INCLUDE COND=(49,9,CH,EQ,C'000000008',OR,49,9,CH,EQ,C'000000028',
OR,49,9,CH,EQ,C'000000040',OR,49,9,CH,EQ,C'000000041',OR,
49,9,CH,EQ,C'000000042',OR,49,9,CH,EQ,C'000000043',OR,
49,9,CH,EQ,C'000000045',OR,49,9,CH,EQ,C'000000046',OR,
49,9,CH,EQ,C'000000053',OR,49,9,CH,EQ,C'000000055',OR,
49,9,CH,EQ,C'000000056',OR,49,9,CH,EQ,C'000000057',OR,
49,9,CH,EQ,C'000000057',OR,49,9,CH,EQ,C'000000059',OR,
49,9,CH,EQ,C'000000060') |
Thanks
-3nadh |
|
| Back to top |
|
 |
Anuj Dhawan
Superior Member

Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
If you have those many different values for the positions 49,9 - you've got to use ORs as you show. I don’t think so that there is some other way round to make your sort-card look rather elegant .
bodatrinadh - It's been more than 4 years now that you had been a member of this very Forum, please use BBcode Tags when you post some code or error message/s. |
|
| Back to top |
|
 |
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
your syntax was incorrect, this should work if you want to use the SS parameter
| Code: |
SORT FIELDS=(16,7,CH,A,49,9,CH,A)
INCLUDE COND=(49,9,SS,EQ,C'000000008,000000028,000000040,C
000000041,000000042,000000043,000000045,000000046,C
000000053,000000055,000000056,000000057,000000059,C
000000060')
|
Gerry |
|
| Back to top |
|
 |
Anuj Dhawan
Superior Member

Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Hi Gerry,
I try this, on the LPAR with SYNCSORT FOR Z/OS 1.3.2.2R:
| Code: |
//STEP001 EXEC PGM=SORT
//SORTIN DD *
1,SGL01 ,GBP ,ACK
1 ,SGL 01 ,GBPEUR ,ACK1
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INCLUDE COND=(1,2,SS,EQ,C'GB,C
AC')
//SYSOUT DD SYSOUT=*
//* |
and get a U0016 with following messages in SYSOUT:
| Code: |
SYSIN :
OPTION COPY
INCLUDE COND=(1,2,SS,EQ,C'GB,C
*
AC')
*
WER251A INCLUDE/OMIT INVALID SELF DEF TERM
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE |
Please assist. |
|
| Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
| Syncsort manual wrote: |
| If the control statement does contain a literal string that would extend beyond column 71, place a continuation character in column 72 and begin the continuation of the literal string in column 16 of the next card image. |
Anuj,
The sort card shown by bodatrinadh in his original post was perfectly fine except for the continuation which Gerry has corrected in his post above. The continuation character HAS to be at pos-72 and NOT as shown in your example. |
|
| Back to top |
|
 |
Anuj Dhawan
Superior Member

Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
There is something to learn, for me, today. However, something I'm missing here - below are the two rcords in input and I need all the records from input to output which have GB or AC appearing somewehre in the entire record, so basically both the records should appear in output:
| Quote: |
1,SGL01 ,GBP ,ACK
1 ,SGL 01 ,GBPEUR ,ACK1 |
- tried this, got RC=0 but no output:
| Code: |
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
//STEP001 EXEC PGM=SORT
//SORTIN DD *
1,SGL01 ,GBP ,ACK
1 ,SGL 01 ,GBPEUR ,ACK1
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INCLUDE COND=(1,2,SS,EQ,C'GB,GB,AA,AB,CB,GK,MJ,FK,LK,KK,JJ,JL,DB,LB, C
AC')
//SYSOUT DD SYSOUT=*
//* |
and
| Code: |
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
//STEP001 EXEC PGM=SORT
//SORTIN DD *
1,SGL01 ,GBP ,ACK
1 ,SGL 01 ,GBPEUR ,ACK1
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INCLUDE COND=(1,2,SS,EQ,C'GB, C
AC')
//SYSOUT DD SYSOUT=*
//* |
|
|
| Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
Hi Anuj,
You are searching ONLY in pos 1-2. Change it to 1,80,SS. |
|
| Back to top |
|
 |
sqlcode1
Active Member
Joined: 08 Apr 2010 Posts: 577 Location: USA
|
|
|
|
| Quote: |
| - tried this, got RC=0 but no output: |
Anuj,
I don't have syncsort so pardon me if my suggestion is not relevant but it looks like you are searching for the "string" in the first 2 bytes and not the entire record. The card looks for search string in the first 2 byte and it doesn't find the string.
Should it not be like 1,80,SS...?
Thanks, |
|
| Back to top |
|
 |
Anuj Dhawan
Superior Member

Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
bad day?
| Code: |
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
//STEP001 EXEC PGM=SORT
//SORTIN DD *
1,SGL01 ,GBP ,ACK
1 ,SGL 01 ,GBPEUR ,ACK1
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INCLUDE COND=(1,80,SS,EQ,C'GB, C
AC')
//SYSOUT DD SYSOUT=*
//* |
SYSOUT:
| Code: |
SORTIN : RECFM=FB ; LRECL= 80; BLKSIZE= 80
SORTOUT : RECFM=FB ; LRECL= 80; BLKSIZE= 80
5,868K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
0 BYTES RESERVE REQUESTED, 156K BYTES USED
INSERT 0, DELETE 2
SYNCSMF CALLED BY SYNCSORT; RC=0000
SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
BSAM WAS USED FOR SORTIN
BSAM WAS USED FOR SORTOUT
RCD IN 2, OUT 0 |
Other one:
| Code: |
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
//STEP001 EXEC PGM=SORT
//SORTIN DD *
1,SGL01 ,GBP ,ACK
1 ,SGL 01 ,GBPEUR ,ACK1
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INCLUDE COND=(1,80,SS,EQ,C'GB,GB,AA,AB,CB,GK,MJ,FK,LK,KK,JJ,JL,DB,LB,C
AC')
//SYSOUT DD SYSOUT=*
//* |
| Code: |
SORTIN : RECFM=FB ; LRECL= 80; BLKSIZE= 80
SORTOUT : RECFM=FB ; LRECL= 80; BLKSIZE= 80
5,868K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
0 BYTES RESERVE REQUESTED, 156K BYTES USED
INSERT 0, DELETE 2
SYNCSMF CALLED BY SYNCSORT; RC=0000
SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
BSAM WAS USED FOR SORTIN
BSAM WAS USED FOR SORTOUT
RCD IN 2, OUT 0 |
|
|
| Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
| Arun Raj wrote: |
| Syncsort manual wrote: |
| If the control statement does contain a literal string that would extend beyond column 71, place a continuation character in column 72 and begin the continuation of the literal string in column 16 of the next card image. |
|
Hi Anuj,
Not so bad for me
Your continuation starts at pos-17 instead of 16. |
|
| Back to top |
|
 |
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
I think the SS parameter has been misinterpreted.
In this example
| Code: |
| INCLUDE COND=(1,80,SS,EQ,C'GB,GB,AA,AB,CB,GK,MJ,FK,LK,KK,JJ,JL,DB,LB |
The search is for
| Code: |
'GB,GB,AA,AB,CB,GK,MJ,FK,LK,KK,JJ,JL,DB,LB'
|
as the length of the field to be tested is greater than the constant to be searched.
In Anuj's example you need this
| Code: |
OPTION COPY
INCLUDE COND=(1,80,SS,EQ,C'GB',OR,
1,80,SS,EQ,C'AA',OR,
1,80,SS,EQ,C'AB',OR,
1,80,SS,EQ,C'AC')
|
Gerry |
|
| Back to top |
|
 |
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2482 Location: @my desk
|
|
|
|
Gerry,
You're right. I missed that point here. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|