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
 

 

find a string in a ps file using macro w/o opening file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
abhikulsh
Currently Banned

New User


Joined: 17 Feb 2011
Posts: 12
Location: chennai

PostPosted: Mon Mar 21, 2011 8:43 pm    Post subject: find a string in a ps file using macro w/o opening file
Reply with quote

Hi

I am using the below mentioned code..
/*REXX*/
INDSN='F0091PSH.GV2L.PARG.AMEND.EXTRACT.RECS.N10331'
ADDRESS ISPEXEC "VIEW DATASET('"INDSN"') MACRO(TESTI)"

actually i don't want to view the file..i simply want to count w/o opening the file.

my macro testi is:

/*REXX*/
ADDRESS ISREDIT
"MACRO"
"SEEK ALL '0107130E'"
"(V1)=SEEK_COUNTS"
SAY V1


It gives result but it opens the file in view mode also..which i dont want
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Mon Mar 21, 2011 8:48 pm    Post subject: Reply to: find a string in a ps file using macro w/o opening
Reply with quote

You just need to finish your macro so that it ends the VIEW service when it's done.
Back to top
View user's profile Send private message
abhikulsh
Currently Banned

New User


Joined: 17 Feb 2011
Posts: 12
Location: chennai

PostPosted: Mon Mar 21, 2011 8:57 pm    Post subject: I gave exit to end macro
Reply with quote

just gave exit at the end..still it opens..could u suggest something else?
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Mon Mar 21, 2011 8:59 pm    Post subject: Reply to: find a string in a ps file using macro w/o opening
Reply with quote

An END statement would be helpful.
Back to top
View user's profile Send private message
abhikulsh
Currently Banned

New User


Joined: 17 Feb 2011
Posts: 12
Location: chennai

PostPosted: Mon Mar 21, 2011 9:01 pm    Post subject: An end w/o a do ..?
Reply with quote

gave an END after macro ends..getting error
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: Mon Mar 21, 2011 9:20 pm    Post subject:
Reply with quote

How about posting the error. Like we can actually see your screen from where we are icon_rolleyes.gif

Psychic day is Wednesday this week.
Back to top
View user's profile Send private message
abhikulsh
Currently Banned

New User


Joined: 17 Feb 2011
Posts: 12
Location: chennai

PostPosted: Mon Mar 21, 2011 9:23 pm    Post subject: gave an end
Reply with quote

Hi

I gave a do and end
/*REXX*/
ADDRESS ISREDIT
DO
"MACRO"
"SEEK ALL '0107130E'"
"(V1)=SEEK_COUNTS"
CHAROUT(INDSN);
SAY V1
END

I am not getting error but still it opens the file in view mode..which i dont want
Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Mon Mar 21, 2011 9:29 pm    Post subject:
Reply with quote

It seems that you also added a 'DO' before the "MACRO" statement - thus the 'END' signals the end of the DO loop, not the end of the view session.
Back to top
View user's profile Send private message
abhikulsh
Currently Banned

New User


Joined: 17 Feb 2011
Posts: 12
Location: chennai

PostPosted: Mon Mar 21, 2011 9:36 pm    Post subject: GAVE DO before view statement
Reply with quote

gave
/*REXX*/
ADDRESS TSO
INPUT='F0091PSH.GV2L.PARG.AMEND.EXTRACT.RECS.N10331'
"ALLOC F(MYDDNAME) DA('"INPUT"') SHR REUSE"
"EXECIO * DISKR MYDDNAME (STEM REC. FINIS)"
"FREE F(MYDDNAME)"
DO
ADDRESS ISPEXEC "VIEW DATASET('"INPUT"') MACRO(TESTI)"
END

still file opens in view mode
Back to top
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 982
Location: Oostende, Belgium

PostPosted: Mon Mar 21, 2011 10:02 pm    Post subject:
Reply with quote

Can you please think about what you are doing in your last try, because it has nothing to do with your initial requirement...
Back to top
View user's profile Send private message
abhikulsh
Currently Banned

New User


Joined: 17 Feb 2011
Posts: 12
Location: chennai

PostPosted: Mon Mar 21, 2011 10:06 pm    Post subject:
Reply with quote

actually moderator suggested to use END so i gave this way..but no use..the file is still opening in view mode
Back to top
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 982
Location: Oostende, Belgium

PostPosted: Mon Mar 21, 2011 10:16 pm    Post subject:
Reply with quote

And if the moderator were to suggest that you stick your head in a bucket with ice-cold water, you would also do it?

Just my suggestion, but maybe reading a manual would help?
Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Mon Mar 21, 2011 10:16 pm    Post subject:
Reply with quote

Actually, moderator did NOT say to use DO, so why did you do it that way?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Mon Mar 21, 2011 10:17 pm    Post subject: Reply to: find a string in a ps file using macro w/o opening
Reply with quote

( very good mood on )
the TS was too lazy to click on the END link and simply stuck an END statement somewhere...
but the he got the message for a <dangling> Rexx END
so he stuck a pairing DO ...
( nothing syntactically wrong from a Rexx point of view... but useless )

so repeat with me ( or rather by Yourself ) a few zillions times
to <end/terminate> an EDIT macro an "Address ISREDIT END" statement is needed

outer macro
Code:
000001 /* REXX */
000002 Address ISPEXEC
000003    "VIEW DATASET('USER.CLIST(sampl)') MACRO(INNER) "
000004 exit


inner macro

Code:
000001 /* REXX */
000002 Address ISREDIT
000003 "MACRO"
000004 "SEEK ALL 'DISPLAY' "
000005 "(COUN) = SEEK_COUNTS"
000006 say "COUN=" coun
000007 "END"
000008 exit


disregard the dataset name and the <SEEKED> string !
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Tue Mar 22, 2011 1:45 am    Post subject: Reply to: find a string in a ps file using macro w/o opening
Reply with quote

Quote:
the TS was too lazy to click on the END link and simply stuck an END statement somewhere...

Like.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Tue Mar 22, 2011 2:13 am    Post subject: Reply to: find a string in a ps file using macro w/o opening
Reply with quote

Sigh. And I'm the one who's unemployed?
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 Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
This topic is locked: you cannot edit posts or make replies. Natural ADABAS Opening with CTS enikhilk Mainframe Jobs 0 Wed Nov 30, 2016 5:37 pm
No new posts How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


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