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
 

 

To search a string in a particular position in a PS

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

New User


Joined: 30 Nov 2005
Posts: 19
Location: India

PostPosted: Thu Mar 23, 2006 2:49 pm    Post subject: To search a string in a particular position in a PS
Reply with quote

Hi all ,
Is there any utility avaiable to search for a string in a given position?
we can use ISRSUPC for searching a string is there any way to give the positon of the string in a PS?
Is there someother way of acheiving this requirement?

Thanks & Regards,
Yogesh
Back to top
View user's profile Send private message

balajiofcrrcoe

New User


Joined: 07 Jul 2005
Posts: 41
Location: chennai

PostPosted: Thu Mar 23, 2006 3:39 pm    Post subject: Re: To search a string in a particular position in a PS
Reply with quote

Hi,

yes you can search within a position for a string

//SEARCH EXEC PGM=ISRSUPC,
// PARM='SRCHCMP,ANYC'
//NEWDD DD DISP=SHR,DSN=your.fileto.besearched
//OUTDD DD DISP=SHR,DSN=your.listing.file
//SYSIN DD *
CMPCOLM 5:72
SRCHFOR 'string to be searched'


here 5 is the starting position and 72 is the end positon.


let me know in case of any clarifcations and in case if you find any other way.
regards
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Thu Mar 23, 2006 6:09 pm    Post subject: Re: To search a string in a particular position in a PS
Reply with quote

Yogesh wrote.
Quote:
Is there someother way of acheiving this requirement?

Open the dataset in BROWSE mode & at the command prompt type
Code:
Command ===> F <string> L

where L is the column# string starts from


Regards,
Priyesh.
Back to top
View user's profile Send private message
vidhyanarayanan

New User


Joined: 23 Dec 2005
Posts: 52

PostPosted: Fri Mar 24, 2006 2:11 pm    Post subject:
Reply with quote

hi,
Try SUBSTR( STARTING POSITION:LENGTH)

regards,
vidhya
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 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
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am


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