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

INCLUDE condition for 'Contains'


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

New User


Joined: 31 Aug 2007
Posts: 55
Location: bangalore

PostPosted: Mon Oct 26, 2015 11:03 pm
Reply with quote

Please help me to write a INCLUDE condition for the following requirement

I have an input file that contains the key value somewhere between position 4 and 14. Given a sample input file below

Input File
Code:
01 XXXB0305YYY
01 B0304XXXXXX
01 XXXYYB0305Y
01 XXB0306YYYY
01 XYXB0306YYY


and I need to pick the record that contain 'B0305' between the position 4 and 14 and need to write output file as below.please help.

Output file
Code:
01 XXXB0305YYY
01 XXXYYB0305Y
Back to top
View user's profile Send private message
krsenthil85

New User


Joined: 31 Aug 2007
Posts: 55
Location: bangalore

PostPosted: Mon Oct 26, 2015 11:30 pm
Reply with quote

I got the solution. I should use the command SS instead of CH as below

((1,1000,SS,EQ,C'B0135101')
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Mon Oct 26, 2015 11:32 pm
Reply with quote

look for 'SS' Substring.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Mon Oct 26, 2015 11:44 pm
Reply with quote

Quote:
and I need to pick the record that contain 'B0305' between the position 4 and 14 and need to write output file as below.please help.


This conflicts your sort card.

www-01.ibm.com/support/knowledgecenter/#!/SSLTBW_2.1.0/com.ibm.zos.v2r1.iceg200/subsrch.htm
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Tue Oct 27, 2015 3:02 am
Reply with quote

krsenthil85 wrote:
I got the solution. I should use the command SS instead of CH as below

((1,1000,SS,EQ,C'B0135101')


Why do you need to search all the 1000 bytes when your value is expected between 4-15?
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 INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts How to give complex condition in JCL . CLIST & REXX 30
No new posts selectively copy based on condition DFSORT/ICETOOL 3
This topic is locked: you cannot edit posts or make replies. Sort to include records of file 2 int... Java & MQSeries 1
This topic is locked: you cannot edit posts or make replies. Control-m JOB executing even when the... Compuware & Other Tools 6
Search our Forums:

Back to Top