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
 

 

Search String - Starting location of the string unknown

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
ranjanp

New User


Joined: 02 May 2006
Posts: 25

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

Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
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: 25

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: 500
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: 25

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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts copying data without knowing location arunsoods DFSORT/ICETOOL 11 Thu Jul 20, 2017 1:03 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm


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