Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to search a string obtained from reading a file?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
pkmurali
Warnings : 1

Active User


Joined: 15 Dec 2005
Posts: 237

PostPosted: Wed Dec 31, 2008 1:15 pm    Post subject: How to search a string obtained from reading a file?
Reply with quote

Hi,
I read a file(ex:f1) using EXECIO and get a string (ex: adams1) from a file(f1). I searched the string using "ISREDIT F ALL 'STRING'". Since the i used F ALL 'STRING' the value for the string won't be searched. Please let me know how to search the value of the string obtained from file(f1) .

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

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Wed Dec 31, 2008 1:34 pm    Post subject:
Reply with quote

You question is not clear to me. You said you used EXECIO (whis is TSO) and then ISREDIT (which is ISPF Edit-Macro). Please elaborate or post your code.

O.
Back to top
View user's profile Send private message
pkmurali
Warnings : 1

Active User


Joined: 15 Dec 2005
Posts: 237

PostPosted: Wed Dec 31, 2008 1:49 pm    Post subject:
Reply with quote

This is the piece of the code

LIST=ADCFGQ3.PARM.LIST
OUTPS=ADCFGQ3.PARM.RESULT
ADDRESS ISPEXEC
"ISREDIT MACRO"
ADDRESS ISPEXEC
"CONTROL ERRORS RETURN"
ADDRESS ISPEXEC
"ISREDIT X ALL"
"ISREDIT F ALL '-*'"
"ISREDIT DEL ALL NX"
ADDRESS TSO
"ALLOC DA('"LIST"') F(INDD) SHR"
IF RC = 0 THEN
DO
ADDRESS TSO
"EXECIO * DISKR INDD(FINIS STEM REC_STM."
END
ELSE
DO
SAY 'ERROR IN ALLOCATING FILE' LIST
END
DO I = 1 TO REC_STM.0
A1= REC_STM.I
SAY 'A1=' A1
PARSE VALUE A1 WITH L1 L2 L3 L4 L5 L6 L7 L8
ADDRESS ISPEXEC
"ISREDIT F ALL L2"
IF RC =0 THEN
.
.

I need to find the value of l2 not l2. Please suggest.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8631
Location: Back in jolly old England

PostPosted: Wed Dec 31, 2008 1:55 pm    Post subject:
Reply with quote

Quote:
"ISREDIT F ALL L2"

Looks like the quotes are in the wrong place to me.

L2 is within the quotes and will be accepted as a literal rather than a variable.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Wed Dec 31, 2008 2:02 pm    Post subject:
Reply with quote

Change it to "ISREDIT F ALL &l2"

O.
Back to top
View user's profile Send private message
pkmurali
Warnings : 1

Active User


Joined: 15 Dec 2005
Posts: 237

PostPosted: Wed Dec 31, 2008 3:03 pm    Post subject:
Reply with quote

Thanks O.
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2092
Location: Silicon Valley

PostPosted: Wed Dec 31, 2008 9:37 pm    Post subject: Reply to: How to search a string obtained from reading a fil
Reply with quote

I prefer using rexx syntax rather than the ampersand notation:
Code:
Change it to "ISREDIT F ALL C'"l2"'"
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 -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Utility for search operation Gopalakrishna551 TSO/ISPF 11 Wed Jan 03, 2018 11:07 am
No new posts COB2 file processing rizwanaccy COBOL Programming 8 Tue Jan 02, 2018 1:00 pm
No new posts KSDS and Index file in cobol deepak14450 COBOL Programming 9 Fri Dec 22, 2017 9:36 am
No new posts Preserve order in Input File pshongal DFSORT/ICETOOL 13 Thu Dec 21, 2017 4:20 pm
No new posts TBSARG - Deleting the search criteria... ISPFHerc TSO/ISPF 6 Thu Dec 14, 2017 8:18 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us