View previous topic :: View next topic
|
Author |
Message |
harsh singh
New User
Joined: 11 Dec 2007 Posts: 26 Location: INDIA
|
|
|
|
Hi,
I have a requirement where I need to filter all records which has HEX Value with in Range 224 to 275.
i have designed the below sort card for it
INCLUDE COND=((224,1,CH,EQ,X'15') OR (225,1,CH,EQ,X'15') OR (226,1,CH,EQ,X'15') OR .... (275,1,CH,EQ,X'15'))
but to my customer this is not acceptable.
Thank You. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
OK, so what is acceptable to your customer.
Is it the use of sort that is unacceptable, or the way in which your sort statements are coded.
Can you please explain exactly what it is that you are trying to achieve using the sort product.
From what you have shown it looks as though you want to include any record that has a X'15' value anywhere between colums 224 and 275. Is this correct.
Because the solution for sort related questions may vary from product to product, please ensure that you state clearly which sort product you are using.
If you are not sure, then by running a simple sort step shown below, you will be able to find out for yourself.
If the messages start with ICE then your product is DFSORT. Please also post the output of the complete line which has a message code ICE201I, as this will enable our DFSORT experts to determine which release of DFSORT that you have installed. This may also affect the solution offered.
If the messages start with WER or SYT then the product is SYNCSORT and the topic will be moved into the JCL forum by one of the moderators. Please also post the information telling which version of SYNCSORT is installed, as this may also affect the solution offered.
Thank you for taking your time to ensure that the valuable time of others is not wasted by offering inappropriate solutions which are not relevant due to the sort product being used and/or the release that is installed in your site.
Code: |
//SORTSTEP EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
ABC
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY |
|
|
Back to top |
|
|
harsh singh
New User
Joined: 11 Dec 2007 Posts: 26 Location: INDIA
|
|
|
|
The way i have coded the sort statement is unaccpetable as here i am using 50 OR CONDITIONS for checking between 224 to 275 position.
According to my customer code looks bulky and is inefficient.
Yes your understanding is correct , I want to drop any record between 224 to 275 where X15 lies.
Thank You your quick turn around. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Using the substring function which will include any record which has X'15' anywhere between colums 224 and 275.
Code: |
INCLUDE COND=(224,52,SS,EQ,X'15') |
As your code shows INCLUDE but you last said DROP - if it is DROP, then change INCLUDE for OMIT. |
|
Back to top |
|
|
harsh singh
New User
Joined: 11 Dec 2007 Posts: 26 Location: INDIA
|
|
|
|
Thank You for your response, it has fulfilled my expectations. |
|
Back to top |
|
|
|