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

How to search a string obtained from reading a file?


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
pkmurali
Warnings : 1

Active User


Joined: 15 Dec 2005
Posts: 271

PostPosted: Wed Dec 31, 2008 1:15 pm
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: 2358
Location: Israel

PostPosted: Wed Dec 31, 2008 1:34 pm
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: 271

PostPosted: Wed Dec 31, 2008 1:49 pm
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: 8797
Location: Welsh Wales

PostPosted: Wed Dec 31, 2008 1:55 pm
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: 2358
Location: Israel

PostPosted: Wed Dec 31, 2008 2:02 pm
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: 271

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

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

Global Moderator


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

PostPosted: Wed Dec 31, 2008 9:37 pm
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 All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts FileAid move data from two files to o... Compuware & Other Tools 5
No new posts Sorting date into YYYYMMDD, and creat... DFSORT/ICETOOL 13
No new posts To Sort detail records in a file with... SYNCSORT 5
No new posts To Populate Trailer cnt in the file w... SYNCSORT 1
No new posts Sort card to know that creation date ... DFSORT/ICETOOL 10
Search our Forums:


Back to Top