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

Search String - Starting location of the string unknown


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 496
Location: USA

PostPosted: Fri Apr 25, 2008 2:37 am
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
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: 496
Location: USA

PostPosted: Fri Apr 25, 2008 2:55 am
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 2
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Mainframe openings in Techmahnidra fo... Mainframe Jobs 0
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
Search our Forums:

Back to Top