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

Sort hex Decimal field with in Array range


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

New User


Joined: 11 Dec 2007
Posts: 26
Location: INDIA

PostPosted: Thu Jun 17, 2010 5:44 pm
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jun 17, 2010 5:51 pm
Reply with quote

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

New User


Joined: 11 Dec 2007
Posts: 26
Location: INDIA

PostPosted: Thu Jun 17, 2010 6:00 pm
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jun 17, 2010 6:04 pm
Reply with quote

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

New User


Joined: 11 Dec 2007
Posts: 26
Location: INDIA

PostPosted: Thu Jun 17, 2010 7:42 pm
Reply with quote

Thank You for your response, it has fulfilled my expectations.
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 Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts To get the count of rows for every 1 ... DB2 3
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
Search our Forums:

Back to Top