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: 8593
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: 2086
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 line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
No new posts HEX value search in a DB2 query maxsubrat DB2 2 Wed Oct 04, 2017 3:04 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am

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