search the given PS file for a string

Ask/Clarify the questions on TSO, CLIST & REXX

Moderators: Veera, Moderator Group

Post Reply
phaniyelugula
Member
Posts: 20
Joined: Mon Dec 30, 2013 6:03 pm

search the given PS file for a string

Post by phaniyelugula » Thu Mar 27, 2014 3:35 pm

Hi All..

Is there a way to search the PS file for a string given by use and if the PS file has that string then that complete line has to be written into a PDS member(we have to create it in the program)

If INPUT file(input.ps) content is..

Code: Select all

Select * from Table;
Drop table;
create table;
Select emp from table;
delete from table
Out put should be(Rexx.output(mem1))...

Code: Select all

select * from table
select emp from table
Please help me out


Thanks in advance

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Thu Mar 27, 2014 9:25 pm

Very confusing specification/explanation but how about a macro that does this how you would do it manually in ISPF:

x all
f 'string to find' all
del all x
create pdsnam(membername) .zfirst .zlast
cancel
Regards
Nic

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others