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: 2590
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: 2590
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

Moderator


Joined: 07 Sep 2006
Posts: 1565
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
This topic is locked: you cannot edit posts or make replies. include and copy COBOL Programming 4
No new posts include cond ascii constant DFSORT/ICETOOL 4
No new posts REMOVE DUPLICATE RECORDS BASED ON A S... DFSORT/ICETOOL 4
No new posts Converting Hex to PD Special Condition SYNCSORT 3
No new posts Required Date Format in Include Sort ... DFSORT/ICETOOL 6
Search our Forums:

Back to Top