Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Search String - Starting location of the string unknown

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL
Author Message
ranjanp

New User


Joined: 02 May 2006
Posts: 24

PostPosted: Fri Apr 25, 2008 2:22 am    Post subject: Search String - Starting location of the string unknown
Reply with quote

Hello All,

I have a 5000 byte file. It has fillers starting from 3220 bytes till end. I need to search for those records which has a particular string 'XXXXX' at any location between 3220 and 5000 bytes. How can I do this using a JCL. Since the starting location of the strin is not know I cant use Syncsort.
Back to top
View user's profile Send private message
References
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 249
Location: USA

PostPosted: Fri Apr 25, 2008 2:37 am    Post subject: Re: Search String - Starting location of the string unknown
Reply with quote

ranjanp wrote:
...at any location between 3220 and 5000 bytes. ... Since the starting location of the strin is not know I cant use Syncsort.

Why can't you use SyncSort? Are you familiar with Substring Comparisons?
Back to top
View user's profile Send private message
ranjanp

New User


Joined: 02 May 2006
Posts: 24

PostPosted: Fri Apr 25, 2008 2:41 am    Post subject: Re: Search String - Starting location of the string unknown
Reply with quote

Alissa Margulies wrote:
ranjanp wrote:
...at any location between 3220 and 5000 bytes. ... Since the starting location of the strin is not know I cant use Syncsort.

Why can't you use SyncSort? Are you familiar with Substring Comparisons?


No. I am not familiar with this.
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 249
Location: USA

PostPosted: Fri Apr 25, 2008 2:55 am    Post subject:
Reply with quote

Try the following:
Code:
//SYSIN DD *
    SORT FIELDS=COPY
    INCLUDE COND=(3220,2780,SS,EQ,C'XXXXX')
/*
Back to top
View user's profile Send private message
ranjanp

New User


Joined: 02 May 2006
Posts: 24

PostPosted: Sat Apr 26, 2008 11:38 am    Post subject:
Reply with quote

Thanks alot Alissa. It worked...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 Hours
Page 1 of 1