View previous topic :: View next topic
|
Author |
Message |
abhikulsh Currently Banned New User
Joined: 17 Feb 2011 Posts: 12 Location: chennai
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
You just need to finish your macro so that it ends the VIEW service when it's done. |
|
Back to top |
|
|
abhikulsh Currently Banned New User
Joined: 17 Feb 2011 Posts: 12 Location: chennai
|
|
|
|
just gave exit at the end..still it opens..could u suggest something else? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
An END statement would be helpful. |
|
Back to top |
|
|
abhikulsh Currently Banned New User
Joined: 17 Feb 2011 Posts: 12 Location: chennai
|
|
|
|
gave an END after macro ends..getting error |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
How about posting the error. Like we can actually see your screen from where we are
Psychic day is Wednesday this week. |
|
Back to top |
|
|
abhikulsh Currently Banned New User
Joined: 17 Feb 2011 Posts: 12 Location: chennai
|
|
|
|
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 |
|
|
Ronald Burr
Active User
Joined: 22 Oct 2009 Posts: 293 Location: U.S.A.
|
|
|
|
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 |
|
|
abhikulsh Currently Banned New User
Joined: 17 Feb 2011 Posts: 12 Location: chennai
|
|
|
|
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 |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1316 Location: Vilnius, Lithuania
|
|
|
|
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 |
|
|
abhikulsh Currently Banned New User
Joined: 17 Feb 2011 Posts: 12 Location: chennai
|
|
|
|
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 |
|
|
prino
Senior Member
Joined: 07 Feb 2009 Posts: 1316 Location: Vilnius, Lithuania
|
|
|
|
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 |
|
|
Ronald Burr
Active User
Joined: 22 Oct 2009 Posts: 293 Location: U.S.A.
|
|
|
|
Actually, moderator did NOT say to use DO, so why did you do it that way? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
( 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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2596 Location: Silicon Valley
|
|
|
|
Quote: |
the TS was too lazy to click on the END link and simply stuck an END statement somewhere... |
Like. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Sigh. And I'm the one who's unemployed? |
|
Back to top |
|
|
|