Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

INCLUDE condition for 'Contains'

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: INCLUDE condition for 'Contains'
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    Post subject: Reply to: INCLUDE condition for 'Contains'
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

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

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

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

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Mon Oct 26, 2015 11:44 pm    Post subject:
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.

https://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: 1529
Location: Andromeda Galaxy

PostPosted: Tue Oct 27, 2015 3:02 am    Post subject: Re: Reply to: INCLUDE condition for 'Contains'
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts INCLUDE condition questions van bui DFSORT/ICETOOL 1 Thu Jun 30, 2016 9:52 am
No new posts 2 vsam file compare and update a fiel... ABINAYATHULASI DFSORT/ICETOOL 6 Sun May 29, 2016 11:15 am
No new posts Include Cond issue vickey_dw DFSORT/ICETOOL 6 Tue Mar 29, 2016 8:51 pm
No new posts Case insenstive in INCLUDE Condtion smileseenu DFSORT/ICETOOL 2 Mon Feb 15, 2016 8:42 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us